diff options
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index fda38ea3bf1..8d7fe047544 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -1249,6 +1249,8 @@ ObjectFileMachO::CreateSections (SectionList &unified_section_list) offset = load_cmd_offset + encryption_cmd.cmdsize; } + bool section_file_addresses_changed = false; + offset = MachHeaderSizeFromMagic(m_header.magic); struct segment_command_64 load_cmd; @@ -1377,6 +1379,10 @@ ObjectFileMachO::CreateSections (SectionList &unified_section_list) // where this code path will be taken will not have eh_frame sections. unified_section_sp->SetFileAddress(load_cmd.vmaddr); + + // Notify the module that the section addresses have been changed once + // we're done so any file-address caches can be updated. + section_file_addresses_changed = true; } } m_sections_ap->AddSection(unified_section_sp); @@ -1669,6 +1675,12 @@ ObjectFileMachO::CreateSections (SectionList &unified_section_list) offset = load_cmd_offset + load_cmd.cmdsize; } + + + if (section_file_addresses_changed && module_sp.get()) + { + module_sp->SectionFileAddressesChanged(); + } } } |