diff options
| author | Todd Fiala <tfiala@google.com> | 2014-01-18 03:02:39 +0000 |
|---|---|---|
| committer | Todd Fiala <tfiala@google.com> | 2014-01-18 03:02:39 +0000 |
| commit | a9ddb0e14fa6ef559efb36654e1cc9e3c9e6c0d9 (patch) | |
| tree | ee6e54765addf9701ad9f49a6799d037b178eaa7 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp | |
| parent | ed91da719e53e2dd6d665347188e541b45931672 (diff) | |
| download | bcm5719-llvm-a9ddb0e14fa6ef559efb36654e1cc9e3c9e6c0d9.tar.gz bcm5719-llvm-a9ddb0e14fa6ef559efb36654e1cc9e3c9e6c0d9.zip | |
Added distribution info to ArchSpec and qHostInfo message.
ArchSpec now contains an optional distribution_id, with getters and
setters. Host::GetArchitecture () sets it on non-Apple platforms using
Host::GetDistributionId (). The distribution_id is ignored during
ArchSpec comparisons.
The gdb remote qHostInfo message transmits it, if set, via the
distribution_id={id-value} key/value pair. Updated gdb remote docs to
reflect this change.
As before, GetDistributionId () returns nothing on non-Linux platforms
at this time. On Linux, it is returned only if the lsb_platform
command is installed (in /bin or /usr/bin), and only if the
distributor id key is returned by 'lsb_platform -i'. This id is
lowercased, and whitespace is replaced with underscores.
llvm-svn: 199539
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp index 9579e7cc2a5..bed8852b7a0 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp @@ -313,6 +313,14 @@ GDBRemoteCommunicationServer::Handle_qHostInfo (StringExtractorGDBRemote &packet response.PutCStringAsRawHex8(host_triple.getTriple().c_str()); response.Printf (";ptrsize:%u;",host_arch.GetAddressByteSize()); + const char* distribution_id = host_arch.GetDistributionId ().AsCString (); + if (distribution_id) + { + response.PutCString("distribution_id:"); + response.PutCStringAsRawHex8(distribution_id); + response.PutCString(";"); + } + uint32_t cpu = host_arch.GetMachOCPUType(); uint32_t sub = host_arch.GetMachOCPUSubType(); if (cpu != LLDB_INVALID_CPUTYPE) |

