summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/Mach-O
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2018-12-11 15:21:15 +0000
committerPavel Labath <pavel@labath.sk>2018-12-11 15:21:15 +0000
commitd1e3fe2190acbd9b38a2badf6e40d2f7014b9ed4 (patch)
treeb9503ea6dfb91ff5720eb6653125cac4c8ab7551 /lldb/source/Plugins/ObjectFile/Mach-O
parent2d7f3a3132c4ee87548279faaf10e0eeab7edb36 (diff)
downloadbcm5719-llvm-d1e3fe2190acbd9b38a2badf6e40d2f7014b9ed4.tar.gz
bcm5719-llvm-d1e3fe2190acbd9b38a2badf6e40d2f7014b9ed4.zip
Rename ObjectFile::GetHeaderAddress to GetBaseAddress
Summary: This function was named such because in the case of MachO files, the mach header is located at this address. However all (most?) usages of this function were not interested in that fact, but the fact that this address is used as the base address for expressing various relative addresses in the object file. For other object file formats, this name is not appropriate (and it's probably the reason why this function was not implemented in these classes). In the ELF case the ELF header will usually end up at this address, but this is a result of the linker optimizing the file layout and not a requirement of the spec. For COFF files, I believe the is no header located at this address either. Reviewers: clayborg, jasonmolenda, amccarth, lemo, stella.stamenova Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D55422 llvm-svn: 348849
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Mach-O')
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp4
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index dafbb64847c..e6b9c520dd1 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1674,7 +1674,7 @@ void ObjectFileMachO::ProcessSegmentCommand(const load_command &load_cmd_,
} else if (unified_section_sp) {
if (is_dsym && unified_section_sp->GetFileAddress() != load_cmd.vmaddr) {
// Check to see if the module was read from memory?
- if (module_sp->GetObjectFile()->GetHeaderAddress().IsValid()) {
+ if (module_sp->GetObjectFile()->GetBaseAddress().IsValid()) {
// We have a module that is in memory and needs to have its file
// address adjusted. We need to do this because when we load a file
// from memory, its addresses will be slid already, yet the addresses
@@ -5339,7 +5339,7 @@ lldb_private::Address ObjectFileMachO::GetEntryPointAddress() {
return m_entry_point_address;
}
-lldb_private::Address ObjectFileMachO::GetHeaderAddress() {
+lldb_private::Address ObjectFileMachO::GetBaseAddress() {
lldb_private::Address header_addr;
SectionList *section_list = GetSectionList();
if (section_list) {
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
index 50a930aa9c2..02546a5344f 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
@@ -104,7 +104,7 @@ public:
lldb_private::Address GetEntryPointAddress() override;
- lldb_private::Address GetHeaderAddress() override;
+ lldb_private::Address GetBaseAddress() override;
uint32_t GetNumThreadContexts() override;
OpenPOWER on IntegriCloud