summaryrefslogtreecommitdiffstats
path: root/lldb/include
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/include
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/include')
-rw-r--r--lldb/include/lldb/Core/ArchSpec.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/include/lldb/Core/ArchSpec.h b/lldb/include/lldb/Core/ArchSpec.h
index 7f2fd77a093..554670ea8e0 100644
--- a/lldb/include/lldb/Core/ArchSpec.h
+++ b/lldb/include/lldb/Core/ArchSpec.h
@@ -13,6 +13,7 @@
#if defined(__cplusplus)
#include "lldb/lldb-private.h"
+#include "lldb/Core/ConstString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
@@ -203,6 +204,30 @@ public:
GetMachine () const;
//------------------------------------------------------------------
+ /// Returns the distribution id of the architecture.
+ ///
+ /// This will be something like "ubuntu", "fedora", etc. on Linux.
+ ///
+ /// @return A ConstString ref containing the distribution id,
+ /// potentially empty.
+ //------------------------------------------------------------------
+ const ConstString&
+ GetDistributionId () const;
+
+ //------------------------------------------------------------------
+ /// Set the distribution id of the architecture.
+ ///
+ /// This will be something like "ubuntu", "fedora", etc. on Linux.
+ /// This should be the same value returned by
+ /// Host::GetDistributionId ().
+ ///
+ /// @return A ConstString ref containing the distribution id,
+ /// potentially empty.
+ //------------------------------------------------------------------
+ void
+ SetDistributionId (const char* distribution_id);
+
+ //------------------------------------------------------------------
/// Tests if this ArchSpec is valid.
///
/// @return True if the current architecture is valid, false
@@ -400,6 +425,8 @@ protected:
Core m_core;
lldb::ByteOrder m_byte_order;
+ ConstString m_distribution_id;
+
// Called when m_def or m_entry are changed. Fills in all remaining
// members with default values.
void
OpenPOWER on IntegriCloud