File indexing completed on 2026-05-10 08:42:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef LLDB_TARGET_SECTIONLOADLIST_H
0011 #define LLDB_TARGET_SECTIONLOADLIST_H
0012
0013 #include <map>
0014 #include <mutex>
0015
0016 #include "llvm/ADT/DenseMap.h"
0017 #include "lldb/Core/Section.h"
0018 #include "lldb/lldb-public.h"
0019
0020 namespace lldb_private {
0021
0022 class SectionLoadList {
0023 public:
0024
0025 SectionLoadList() = default;
0026
0027 SectionLoadList(const SectionLoadList &rhs);
0028
0029 ~SectionLoadList() {
0030
0031
0032 Clear();
0033 }
0034
0035 void operator=(const SectionLoadList &rhs);
0036
0037 bool IsEmpty() const;
0038
0039 void Clear();
0040
0041 lldb::addr_t GetSectionLoadAddress(const lldb::SectionSP §ion_sp) const;
0042
0043 bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr,
0044 bool allow_section_end = false) const;
0045
0046 bool SetSectionLoadAddress(const lldb::SectionSP §ion_sp,
0047 lldb::addr_t load_addr,
0048 bool warn_multiple = false);
0049
0050
0051
0052
0053 bool SetSectionUnloaded(const lldb::SectionSP §ion_sp,
0054 lldb::addr_t load_addr);
0055
0056
0057
0058
0059 size_t SetSectionUnloaded(const lldb::SectionSP §ion_sp);
0060
0061 void Dump(Stream &s, Target *target);
0062
0063 protected:
0064 typedef std::map<lldb::addr_t, lldb::SectionSP> addr_to_sect_collection;
0065 typedef llvm::DenseMap<const Section *, lldb::addr_t> sect_to_addr_collection;
0066 addr_to_sect_collection m_addr_to_sect;
0067 sect_to_addr_collection m_sect_to_addr;
0068 mutable std::recursive_mutex m_mutex;
0069 };
0070
0071 }
0072
0073 #endif