diff options
author | Greg Clayton <gclayton@fb.com> | 2025-01-14 20:12:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-14 20:12:46 -0800 |
commit | c4fb7180cbbe977f1ab1ce945a691550f8fdd1fb (patch) | |
tree | 9c9e2c55a12a2935dab5e1e43a59fb0818106adf /lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | |
parent | 9ac6a55ec54fe4cd4a99c69ef1a4ddaea49e6688 (diff) | |
download | llvm-c4fb7180cbbe977f1ab1ce945a691550f8fdd1fb.zip llvm-c4fb7180cbbe977f1ab1ce945a691550f8fdd1fb.tar.gz llvm-c4fb7180cbbe977f1ab1ce945a691550f8fdd1fb.tar.bz2 |
[lldb][NFC] Make the target's SectionLoadList private. (#113278)
Lots of code around LLDB was directly accessing the target's section
load list. This NFC patch makes the section load list private so the
Target class can access it, but everyone else now uses accessor
functions. This allows us to control the resolving of addresses and will
allow for functionality in LLDB which can lazily resolve addresses in
JIT plug-ins with a future patch.
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 488c9bd..bf2d293 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -6253,9 +6253,9 @@ bool ObjectFileMachO::SetLoadAddress(Target &target, lldb::addr_t value, "0x%" PRIx64, section_sp->GetName().AsCString(), section_sp->GetFileAddress() + value); - if (target.GetSectionLoadList().SetSectionLoadAddress( - section_sp, section_sp->GetFileAddress() + value, - warn_multiple)) + if (target.SetSectionLoadAddress(section_sp, + section_sp->GetFileAddress() + value, + warn_multiple)) ++num_loaded_sections; } } @@ -6276,8 +6276,8 @@ bool ObjectFileMachO::SetLoadAddress(Target &target, lldb::addr_t value, "ObjectFileMachO::SetLoadAddress segment '%s' load addr is " "0x%" PRIx64, section_sp->GetName().AsCString(), section_load_addr); - if (target.GetSectionLoadList().SetSectionLoadAddress( - section_sp, section_load_addr, warn_multiple)) + if (target.SetSectionLoadAddress(section_sp, section_load_addr, + warn_multiple)) ++num_loaded_sections; } } |