1 //===-- AddressResolver.h ---------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_AddressResolver_h_
11 #define liblldb_AddressResolver_h_
17 // Other libraries and framework includes
19 #include "lldb/lldb-private.h"
20 #include "lldb/Core/Address.h"
21 #include "lldb/Core/AddressRange.h"
22 #include "lldb/Host/FileSpec.h"
23 #include "lldb/Core/SearchFilter.h"
24 #include "lldb/Core/ConstString.h"
26 namespace lldb_private {
28 //----------------------------------------------------------------------
29 /// @class AddressResolver AddressResolver.h "lldb/Core/AddressResolver.h"
30 /// @brief This class works with SearchFilter to resolve function names and
31 /// source file locations to their concrete addresses.
32 //----------------------------------------------------------------------
34 //----------------------------------------------------------------------
36 /// The AddressResolver is a Searcher. In that protocol,
37 /// the SearchFilter asks the question "At what depth of the symbol context
38 /// descent do you want your callback to get called?" of the filter. The resolver
39 /// answers this question (in the GetDepth method) and provides the resolution callback.
40 //----------------------------------------------------------------------
42 class AddressResolver :
61 ResolveAddress (SearchFilter &filter);
64 ResolveAddressInModules (SearchFilter &filter,
68 GetDescription (Stream *s) = 0;
70 std::vector<AddressRange> &
74 GetNumberOfAddresses ();
77 GetAddressRangeAtIndex (size_t idx);
81 std::vector<AddressRange> m_address_ranges;
84 DISALLOW_COPY_AND_ASSIGN(AddressResolver);
87 } // namespace lldb_private
89 #endif // liblldb_AddressResolver_h_