1 //===-- AddressResolver.cpp -----------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "lldb/Core/AddressResolver.h" 10 11 #include "lldb/Core/SearchFilter.h" 12 13 namespace lldb_private { 14 class ModuleList; 15 } 16 17 using namespace lldb_private; 18 19 // AddressResolver: 20 AddressResolver::AddressResolver() = default; 21 22 AddressResolver::~AddressResolver() = default; 23 ResolveAddressInModules(SearchFilter & filter,ModuleList & modules)24void AddressResolver::ResolveAddressInModules(SearchFilter &filter, 25 ModuleList &modules) { 26 filter.SearchInModuleList(*this, modules); 27 } 28 ResolveAddress(SearchFilter & filter)29void AddressResolver::ResolveAddress(SearchFilter &filter) { 30 filter.Search(*this); 31 } 32 GetAddressRanges()33std::vector<AddressRange> &AddressResolver::GetAddressRanges() { 34 return m_address_ranges; 35 } 36 GetNumberOfAddresses()37size_t AddressResolver::GetNumberOfAddresses() { 38 return m_address_ranges.size(); 39 } 40 GetAddressRangeAtIndex(size_t idx)41AddressRange &AddressResolver::GetAddressRangeAtIndex(size_t idx) { 42 return m_address_ranges[idx]; 43 } 44