summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBSection.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp
index 24b94a7a53a..06a08d865f4 100644
--- a/lldb/source/API/SBSection.cpp
+++ b/lldb/source/API/SBSection.cpp
@@ -9,6 +9,7 @@
#include "lldb/API/SBSection.h"
#include "lldb/API/SBStream.h"
+#include "lldb/API/SBTarget.h"
#include "lldb/Core/DataBuffer.h"
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/Log.h"
@@ -126,6 +127,22 @@ SBSection::GetFileAddress ()
}
lldb::addr_t
+SBSection::GetLoadAddress (lldb::SBTarget &sb_target)
+{
+ TargetSP target_sp(sb_target.GetSP());
+ if (target_sp)
+ {
+ SectionSP section_sp (GetSP());
+ if (section_sp)
+ return section_sp->GetLoadBaseAddress(target_sp.get());
+ }
+ return LLDB_INVALID_ADDRESS;
+
+}
+
+
+
+lldb::addr_t
SBSection::GetByteSize ()
{
SectionSP section_sp (GetSP());
OpenPOWER on IntegriCloud