• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- AddressResolverFileLine.h -------------------------------*- C++ -*-===//
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 #ifndef LLDB_CORE_ADDRESSRESOLVERFILELINE_H
10 #define LLDB_CORE_ADDRESSRESOLVERFILELINE_H
11 
12 #include "lldb/Core/AddressResolver.h"
13 #include "lldb/Core/SearchFilter.h"
14 #include "lldb/Utility/FileSpec.h"
15 #include "lldb/lldb-defines.h"
16 
17 #include <stdint.h>
18 
19 namespace lldb_private {
20 class Address;
21 class Stream;
22 class SymbolContext;
23 
24 /// \class AddressResolverFileLine AddressResolverFileLine.h
25 /// "lldb/Core/AddressResolverFileLine.h" This class finds address for source
26 /// file and line.  Optionally, it will look for inlined instances of the file
27 /// and line specification.
28 
29 class AddressResolverFileLine : public AddressResolver {
30 public:
31   AddressResolverFileLine(const FileSpec &resolver, uint32_t line_no,
32                           bool check_inlines);
33 
34   ~AddressResolverFileLine() override;
35 
36   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
37                                           SymbolContext &context,
38                                           Address *addr) override;
39 
40   lldb::SearchDepth GetDepth() override;
41 
42   void GetDescription(Stream *s) override;
43 
44 protected:
45   FileSpec m_file_spec;   // This is the file spec we are looking for.
46   uint32_t m_line_number; // This is the line number that we are looking for.
47   bool m_inlines; // This determines whether the resolver looks for inlined
48                   // functions or not.
49 
50 private:
51   AddressResolverFileLine(const AddressResolverFileLine &) = delete;
52   const AddressResolverFileLine &
53   operator=(const AddressResolverFileLine &) = delete;
54 };
55 
56 } // namespace lldb_private
57 
58 #endif // LLDB_CORE_ADDRESSRESOLVERFILELINE_H
59