diff options
author | Alex Langford <alangford@apple.com> | 2023-05-02 14:48:10 -0700 |
---|---|---|
committer | Alex Langford <alangford@apple.com> | 2023-05-03 10:30:42 -0700 |
commit | cd05ffdbb2c303cbf476a3a48b3f67094d428e37 (patch) | |
tree | d576b498f7bd61c1ec374b51f1ba1beb48aa9528 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | 5c34cdaad7c2fdb995e5160f502022583e55b5b2 (diff) | |
download | llvm-cd05ffdbb2c303cbf476a3a48b3f67094d428e37.zip llvm-cd05ffdbb2c303cbf476a3a48b3f67094d428e37.tar.gz llvm-cd05ffdbb2c303cbf476a3a48b3f67094d428e37.tar.bz2 |
[lldb] Remove distribution_id from ArchSpec
The qHostInfo packet in the gdb-remote communication protocol specifies
that distribution_id can be set, so lldb handles that. But we store that
in the ArchSpec representing the "Host" platform (whatever platform the
debug server is running on). This field is otherwise unused in ArchSpec,
so it would be a lot easier if we stored that information at the
gdb-remote communication layer.
Sidenote: The distribution_id field is currently unused but I did not
want to remove it in case some folks found it useful (e.g. in downstream
forks).
Differential Revision: https://reviews.llvm.org/D149697
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 18552ea..0501c5b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -69,10 +69,10 @@ GDBRemoteCommunicationClient::GDBRemoteCommunicationClient() m_supports_vFileSize(true), m_supports_vFileMode(true), m_supports_vFileExists(true), m_supports_vRun(true), - m_host_arch(), m_process_arch(), m_os_build(), m_os_kernel(), - m_hostname(), m_gdb_server_name(), m_default_packet_timeout(0), - m_qSupported_response(), m_supported_async_json_packets_sp(), - m_qXfer_memory_map() {} + m_host_arch(), m_host_distribution_id(), m_process_arch(), m_os_build(), + m_os_kernel(), m_hostname(), m_gdb_server_name(), + m_default_packet_timeout(0), m_qSupported_response(), + m_supported_async_json_packets_sp(), m_qXfer_memory_map() {} // Destructor GDBRemoteCommunicationClient::~GDBRemoteCommunicationClient() { @@ -307,6 +307,7 @@ void GDBRemoteCommunicationClient::ResetDiscoverableSettings(bool did_exec) { m_qSymbol_requests_done = false; m_supports_qModuleInfo = true; m_host_arch.Clear(); + m_host_distribution_id.clear(); m_os_version = llvm::VersionTuple(); m_os_build.clear(); m_os_kernel.clear(); @@ -1206,7 +1207,6 @@ bool GDBRemoteCommunicationClient::GetHostInfo(bool force) { std::string environment; std::string vendor_name; std::string triple; - std::string distribution_id; uint32_t pointer_byte_size = 0; ByteOrder byte_order = eByteOrderInvalid; uint32_t num_keys_decoded = 0; @@ -1228,7 +1228,7 @@ bool GDBRemoteCommunicationClient::GetHostInfo(bool force) { ++num_keys_decoded; } else if (name.equals("distribution_id")) { StringExtractor extractor(value); - extractor.GetHexByteString(distribution_id); + extractor.GetHexByteString(m_host_distribution_id); ++num_keys_decoded; } else if (name.equals("os_build")) { StringExtractor extractor(value); @@ -1376,8 +1376,6 @@ bool GDBRemoteCommunicationClient::GetHostInfo(bool force) { m_host_arch.GetTriple().getTriple().c_str(), triple.c_str()); } - if (!distribution_id.empty()) - m_host_arch.SetDistributionId(distribution_id.c_str()); } } } |