9#ifndef LLDB_SOURCE_PLUGINS_PROCESS_WINDOWS_COMMON_LOADEDMODULELIST_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_WINDOWS_COMMON_LOADEDMODULELIST_H
14#include "llvm/ADT/STLExtras.h"
15#include "llvm/ADT/SmallVector.h"
29 using Container = std::map<FileSpec, llvm::SmallVector<lldb::addr_t, 1>>;
33 m_modules[file_spec].push_back(base_addr);
40 auto &base_addrs = it->second;
41 auto addr_it = llvm::find(base_addrs, base_addr);
42 if (addr_it == base_addrs.end())
45 base_addrs.erase(addr_it);
46 if (!base_addrs.empty())
62 return it->second.front();
69 return it ==
m_modules.end() ? nullptr : &it->first;
The images mapped into the inferior.
void Add(const FileSpec &file_spec, lldb::addr_t base_addr)
Container::const_iterator end() const
std::map< FileSpec, llvm::SmallVector< lldb::addr_t, 1 > > Container
std::optional< lldb::addr_t > GetBaseAddress(const FileSpec &file_spec) const
The address file_spec was first mapped at.
const FileSpec * FindFile(const FileSpec &file_spec) const
FileSpec Remove(lldb::addr_t base_addr)
Drop the mapping at base_addr.
Container::const_iterator begin() const
A class that represents a running process on the host machine.