summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host
diff options
context:
space:
mode:
authorTodd Fiala <tfiala@google.com>2014-01-18 03:02:39 +0000
committerTodd Fiala <tfiala@google.com>2014-01-18 03:02:39 +0000
commita9ddb0e14fa6ef559efb36654e1cc9e3c9e6c0d9 (patch)
treeee6e54765addf9701ad9f49a6799d037b178eaa7 /lldb/source/Host
parented91da719e53e2dd6d665347188e541b45931672 (diff)
downloadbcm5719-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/Host')
-rw-r--r--lldb/source/Host/common/Host.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index 5c4bf39e620..7cefd41731c 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -370,23 +370,29 @@ Host::GetArchitecture (SystemDefaultArchitecture arch_kind)
if (triple.getOS() == llvm::Triple::Linux && triple.getVendor() == llvm::Triple::UnknownVendor)
triple.setVendorName ("");
+ const char* distribution_id = GetDistributionId ().AsCString();
+
switch (triple.getArch())
{
default:
g_host_arch_32.SetTriple(triple);
+ g_host_arch_32.SetDistributionId (distribution_id);
g_supports_32 = true;
break;
case llvm::Triple::x86_64:
g_host_arch_64.SetTriple(triple);
+ g_host_arch_64.SetDistributionId (distribution_id);
g_supports_64 = true;
g_host_arch_32.SetTriple(triple.get32BitArchVariant());
+ g_host_arch_32.SetDistributionId (distribution_id);
g_supports_32 = true;
break;
case llvm::Triple::sparcv9:
case llvm::Triple::ppc64:
g_host_arch_64.SetTriple(triple);
+ g_host_arch_64.SetDistributionId (distribution_id);
g_supports_64 = true;
break;
}
OpenPOWER on IntegriCloud