From cd05ffdbb2c303cbf476a3a48b3f67094d428e37 Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Tue, 2 May 2023 14:48:10 -0700 Subject: [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 --- .../Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index 7b10fd4..9e90e98 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -187,8 +187,8 @@ GDBRemoteCommunicationServerCommon::Handle_qHostInfo( response.PutStringAsRawHex8(host_triple.getTriple()); response.Printf(";ptrsize:%u;", host_arch.GetAddressByteSize()); - const char *distribution_id = host_arch.GetDistributionId().AsCString(); - if (distribution_id) { + llvm::StringRef distribution_id = HostInfo::GetDistributionId(); + if (!distribution_id.empty()) { response.PutCString("distribution_id:"); response.PutStringAsRawHex8(distribution_id); response.PutCString(";"); -- cgit v1.1