2010-06-09 00:52:24 +08:00
|
|
|
//===-- AddressResolver.cpp -------------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "lldb/Core/AddressResolver.h"
|
|
|
|
|
|
|
|
#include "lldb/Core/SearchFilter.h"
|
2017-04-07 05:28:29 +08:00
|
|
|
|
|
|
|
namespace lldb_private {
|
|
|
|
class ModuleList;
|
|
|
|
}
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
using namespace lldb_private;
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// AddressResolver:
|
|
|
|
//----------------------------------------------------------------------
|
2016-09-07 04:57:50 +08:00
|
|
|
AddressResolver::AddressResolver() {}
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
AddressResolver::~AddressResolver() {}
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
void AddressResolver::ResolveAddressInModules(SearchFilter &filter,
|
|
|
|
ModuleList &modules) {
|
|
|
|
filter.SearchInModuleList(*this, modules);
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
void AddressResolver::ResolveAddress(SearchFilter &filter) {
|
|
|
|
filter.Search(*this);
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
std::vector<AddressRange> &AddressResolver::GetAddressRanges() {
|
|
|
|
return m_address_ranges;
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
size_t AddressResolver::GetNumberOfAddresses() {
|
|
|
|
return m_address_ranges.size();
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
AddressRange &AddressResolver::GetAddressRangeAtIndex(size_t idx) {
|
2010-06-09 00:52:24 +08:00
|
|
|
return m_address_ranges[idx];
|
|
|
|
}
|