aboutsummaryrefslogtreecommitdiff
path: root/source/Core/Module.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2014-02-18 16:23:10 +0000
committerEd Maste <emaste@FreeBSD.org>2014-02-18 16:23:10 +0000
commit866dcdacfe59f5f448e008fe2c4cb9dfcf72b2ec (patch)
tree95cb16075f0af1b3a05b9b84eb18dda8e6c903e9 /source/Core/Module.cpp
parentde889deb2c386f2a7831befaf226e5c86685fa53 (diff)
downloadsrc-866dcdacfe59f5f448e008fe2c4cb9dfcf72b2ec.tar.gz
src-866dcdacfe59f5f448e008fe2c4cb9dfcf72b2ec.zip
Import lldb as of SVN r201577 (git 2bdc2f6)vendor/lldb/lldb-r201577
(A number of files not required for the FreeBSD build have been removed.) Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/vendor/lldb/dist/; revision=262182 svn path=/vendor/lldb/lldb-r201577/; revision=262183; tag=vendor/lldb/lldb-r201577
Diffstat (limited to 'source/Core/Module.cpp')
-rw-r--r--source/Core/Module.cpp32
1 files changed, 11 insertions, 21 deletions
diff --git a/source/Core/Module.cpp b/source/Core/Module.cpp
index f90a097416df..d5758c09b1e2 100644
--- a/source/Core/Module.cpp
+++ b/source/Core/Module.cpp
@@ -33,6 +33,7 @@
#include "lldb/Target/CPPLanguageRuntime.h"
#include "lldb/Target/ObjCLanguageRuntime.h"
#include "lldb/Target/Process.h"
+#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Target.h"
#include "lldb/Symbol/SymbolFile.h"
@@ -1499,30 +1500,19 @@ Module::SetArchitecture (const ArchSpec &new_arch)
}
bool
-Module::SetLoadAddress (Target &target, lldb::addr_t offset, bool &changed)
+Module::SetLoadAddress (Target &target, lldb::addr_t value, bool value_is_offset, bool &changed)
{
- size_t num_loaded_sections = 0;
- SectionList *section_list = GetSectionList ();
- if (section_list)
+ ObjectFile *object_file = GetObjectFile();
+ if (object_file)
{
- const size_t num_sections = section_list->GetSize();
- size_t sect_idx = 0;
- for (sect_idx = 0; sect_idx < num_sections; ++sect_idx)
- {
- // Iterate through the object file sections to find the
- // first section that starts of file offset zero and that
- // has bytes in the file...
- SectionSP section_sp (section_list->GetSectionAtIndex (sect_idx));
- // Only load non-thread specific sections when given a slide
- if (section_sp && !section_sp->IsThreadSpecific())
- {
- if (target.GetSectionLoadList().SetSectionLoadAddress (section_sp, section_sp->GetFileAddress() + offset))
- ++num_loaded_sections;
- }
- }
+ changed = object_file->SetLoadAddress(target, value, value_is_offset);
+ return true;
}
- changed = num_loaded_sections > 0;
- return num_loaded_sections > 0;
+ else
+ {
+ changed = false;
+ }
+ return false;
}