From fed39aa653441238382bedfb1ad2bfcd09a1962f Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 27 Jun 2012 22:22:28 +0000 Subject: 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. llvm-svn: 159298 --- lldb/source/API/SBSection.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lldb/source/API/SBSection.cpp') diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp index 24b94a7a53a7..06a08d865f44 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" @@ -125,6 +126,22 @@ SBSection::GetFileAddress () return file_addr; } +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 () { -- cgit v1.2.3