]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBFunction.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / API / SBFunction.h
1 //===-- SBFunction.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_SBFunction_h_
10 #define LLDB_SBFunction_h_
11
12 #include "lldb/API/SBAddress.h"
13 #include "lldb/API/SBDefines.h"
14 #include "lldb/API/SBInstructionList.h"
15
16 namespace lldb {
17
18 class LLDB_API SBFunction {
19 public:
20   SBFunction();
21
22   SBFunction(const lldb::SBFunction &rhs);
23
24   const lldb::SBFunction &operator=(const lldb::SBFunction &rhs);
25
26   ~SBFunction();
27
28   explicit operator bool() const;
29
30   bool IsValid() const;
31
32   const char *GetName() const;
33
34   const char *GetDisplayName() const;
35
36   const char *GetMangledName() const;
37
38   lldb::SBInstructionList GetInstructions(lldb::SBTarget target);
39
40   lldb::SBInstructionList GetInstructions(lldb::SBTarget target,
41                                           const char *flavor);
42
43   lldb::SBAddress GetStartAddress();
44
45   lldb::SBAddress GetEndAddress();
46
47   const char *GetArgumentName(uint32_t arg_idx);
48
49   uint32_t GetPrologueByteSize();
50
51   lldb::SBType GetType();
52
53   lldb::SBBlock GetBlock();
54
55   lldb::LanguageType GetLanguage();
56
57   bool GetIsOptimized();
58
59   bool operator==(const lldb::SBFunction &rhs) const;
60
61   bool operator!=(const lldb::SBFunction &rhs) const;
62
63   bool GetDescription(lldb::SBStream &description);
64
65 protected:
66   lldb_private::Function *get();
67
68   void reset(lldb_private::Function *lldb_object_ptr);
69
70 private:
71   friend class SBAddress;
72   friend class SBFrame;
73   friend class SBSymbolContext;
74
75   SBFunction(lldb_private::Function *lldb_object_ptr);
76
77   lldb_private::Function *m_opaque_ptr;
78 };
79
80 } // namespace lldb
81
82 #endif // LLDB_SBFunction_h_