summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/API/SBAddress.cpp29
-rw-r--r--lldb/source/API/SBSymbol.cpp8
-rw-r--r--lldb/source/Core/Module.cpp2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h4
4 files changed, 41 insertions, 2 deletions
diff --git a/lldb/source/API/SBAddress.cpp b/lldb/source/API/SBAddress.cpp
index 61ad71b633c..6c357f9ef53 100644
--- a/lldb/source/API/SBAddress.cpp
+++ b/lldb/source/API/SBAddress.cpp
@@ -12,6 +12,7 @@
#include "lldb/API/SBStream.h"
#include "lldb/Core/Address.h"
#include "lldb/Core/Log.h"
+#include "lldb/Core/Module.h"
#include "lldb/Host/Mutex.h"
#include "lldb/Target/Target.h"
@@ -170,3 +171,31 @@ SBAddress::GetDescription (SBStream &description)
return true;
}
+
+SectionType
+SBAddress::GetSectionType ()
+{
+ if (m_opaque_ap.get())
+ {
+ const Section *section = m_opaque_ap->GetSection();
+ if (section)
+ return section->GetType();
+ }
+ return eSectionTypeInvalid;
+}
+
+
+SBModule
+SBAddress::GetModule ()
+{
+ SBModule sb_module;
+ if (m_opaque_ap.get())
+ {
+ const Module *module = m_opaque_ap->GetModule();
+ if (module)
+ *sb_module = module->GetSP();
+ }
+ return sb_module;
+}
+
+
diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp
index ef8af558c5d..ce232bf3f6a 100644
--- a/lldb/source/API/SBSymbol.cpp
+++ b/lldb/source/API/SBSymbol.cpp
@@ -198,3 +198,11 @@ SBSymbol::GetPrologueByteSize ()
return m_opaque_ptr->GetPrologueByteSize();
return 0;
}
+
+SymbolType
+SBSymbol::GetType ()
+{
+ if (m_opaque_ptr)
+ return m_opaque_ptr->GetType();
+ return eSymbolTypeInvalid;
+}
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 708ff7172ba..7ceff588d16 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -74,7 +74,7 @@ Module::~Module()
ModuleSP
-Module::GetSP ()
+Module::GetSP () const
{
return ModuleList::GetModuleSP (this);
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index 991d92907f4..735fb54f07e 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -168,7 +168,9 @@ public:
const DWARFDebugRanges* DebugRanges() const;
const lldb_private::DataExtractor&
- GetCachedSectionData (uint32_t got_flag, lldb_private::SectionType sect_type, lldb_private::DataExtractor &data);
+ GetCachedSectionData (uint32_t got_flag,
+ lldb::SectionType sect_type,
+ lldb_private::DataExtractor &data);
static bool
SupportedVersion(uint16_t version);
OpenPOWER on IntegriCloud