• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- AddressResolver.cpp -------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "lldb/Core/AddressResolver.h"
11 
12 
13 // Project includes
14 
15 #include "lldb/Core/Address.h"
16 #include "lldb/Core/Log.h"
17 #include "lldb/Core/ModuleList.h"
18 #include "lldb/Core/SearchFilter.h"
19 #include "lldb/Core/Stream.h"
20 #include "lldb/Core/StreamString.h"
21 #include "lldb/Symbol/SymbolContext.h"
22 #include "lldb/Target/Target.h"
23 #include "lldb/lldb-private-log.h"
24 
25 using namespace lldb_private;
26 
27 //----------------------------------------------------------------------
28 // AddressResolver:
29 //----------------------------------------------------------------------
AddressResolver()30 AddressResolver::AddressResolver ()
31 {
32 }
33 
~AddressResolver()34 AddressResolver::~AddressResolver ()
35 {
36 
37 }
38 
39 void
ResolveAddressInModules(SearchFilter & filter,ModuleList & modules)40 AddressResolver::ResolveAddressInModules (SearchFilter &filter, ModuleList &modules)
41 {
42     filter.SearchInModuleList(*this, modules);
43 }
44 
45 void
ResolveAddress(SearchFilter & filter)46 AddressResolver::ResolveAddress (SearchFilter &filter)
47 {
48     filter.Search (*this);
49 }
50 
51 std::vector<AddressRange> &
GetAddressRanges()52 AddressResolver::GetAddressRanges ()
53 {
54     return m_address_ranges;
55 }
56 
57 size_t
GetNumberOfAddresses()58 AddressResolver::GetNumberOfAddresses ()
59 {
60     return m_address_ranges.size();
61 }
62 
63 AddressRange &
GetAddressRangeAtIndex(size_t idx)64 AddressResolver::GetAddressRangeAtIndex (size_t idx)
65 {
66   return m_address_ranges[idx];
67 }
68