summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 967ea6b836f..82224a930c6 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -1113,6 +1113,38 @@ SBTarget::FindModule (const SBFileSpec &sb_file_spec)
return sb_module;
}
+lldb::ByteOrder
+SBTarget::GetByteOrder ()
+{
+ if (m_opaque_sp)
+ return m_opaque_sp->GetArchitecture().GetByteOrder();
+ return eByteOrderInvalid;
+}
+
+const char *
+SBTarget::GetTriple ()
+{
+ if (m_opaque_sp)
+ {
+ std::string triple (m_opaque_sp->GetArchitecture().GetTriple().str());
+ // Unique the string so we don't run into ownership issues since
+ // the const strings put the string into the string pool once and
+ // the strings never comes out
+ ConstString const_triple (triple.c_str());
+ return const_triple.GetCString();
+ }
+ return NULL;
+}
+
+uint32_t
+SBTarget::GetAddressByteSize()
+{
+ if (m_opaque_sp)
+ return m_opaque_sp->GetArchitecture().GetAddressByteSize();
+ return sizeof(void*);
+}
+
+
SBModule
SBTarget::GetModuleAtIndex (uint32_t idx)
{
OpenPOWER on IntegriCloud