Added the ability to read the dSYM plist file with source remappings even when DebugSymbols isn't used to find the dSYM. We now parse the plist as XML in the MacOSX symbol vendor.
Added the ability to get a section load address given a target which is needed for a previous checking which saves crashlogs.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159298 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBSection.cpp b/source/API/SBSection.cpp
index 24b94a7..06a08d8 100644
--- a/source/API/SBSection.cpp
+++ b/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 @@
}
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());