diff --git a/lldb/include/lldb/Target/Platform.h b/lldb/include/lldb/Target/Platform.h index 4ef6c9d82b1a..b804d4877c59 100644 --- a/lldb/include/lldb/Target/Platform.h +++ b/lldb/include/lldb/Target/Platform.h @@ -892,7 +892,7 @@ protected: FileSpec m_working_dir; // The working directory which is used when installing // modules that have no install path set std::string m_remote_url; - std::string m_name; + std::string m_hostname; llvm::VersionTuple m_os_version; ArchSpec m_system_arch; // The architecture of the kernel or the remote platform diff --git a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp index 2ba791671412..219d7c7e37b2 100644 --- a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp +++ b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp @@ -281,10 +281,10 @@ Status PlatformRemoteGDBServer::DisconnectRemote() { const char *PlatformRemoteGDBServer::GetHostname() { if (m_gdb_client_up) - m_gdb_client_up->GetHostname(m_name); - if (m_name.empty()) + m_gdb_client_up->GetHostname(m_hostname); + if (m_hostname.empty()) return nullptr; - return m_name.c_str(); + return m_hostname.c_str(); } llvm::Optional diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index 436ce9e00f02..3331235afa8b 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -385,10 +385,9 @@ ArchSpec Platform::GetAugmentedArchSpec(Platform *platform, llvm::StringRef trip /// Default Constructor Platform::Platform(bool is_host) : m_is_host(is_host), m_os_version_set_while_connected(false), - m_system_arch_set_while_connected(false), m_sdk_sysroot(), m_sdk_build(), - m_working_dir(), m_remote_url(), m_name(), m_system_arch(), m_mutex(), - m_max_uid_name_len(0), m_max_gid_name_len(0), m_supports_rsync(false), - m_rsync_opts(), m_rsync_prefix(), m_supports_ssh(false), m_ssh_opts(), + m_system_arch_set_while_connected(false), m_max_uid_name_len(0), + m_max_gid_name_len(0), m_supports_rsync(false), m_rsync_opts(), + m_rsync_prefix(), m_supports_ssh(false), m_ssh_opts(), m_ignores_remote_hostname(false), m_trap_handlers(), m_calculated_trap_handlers(false), m_module_cache(std::make_unique()) { @@ -793,9 +792,9 @@ const char *Platform::GetHostname() { if (IsHost()) return "127.0.0.1"; - if (m_name.empty()) + if (m_hostname.empty()) return nullptr; - return m_name.c_str(); + return m_hostname.c_str(); } ConstString Platform::GetFullNameForDylib(ConstString basename) {