1 //===-- SBFunction.h --------------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_API_SBFUNCTION_H
10 #define LLDB_API_SBFUNCTION_H
12 #include "lldb/API/SBAddress.h"
13 #include "lldb/API/SBAddressRangeList.h"
14 #include "lldb/API/SBDefines.h"
15 #include "lldb/API/SBInstructionList.h"
19 class LLDB_API SBFunction
{
23 SBFunction(const lldb::SBFunction
&rhs
);
25 const lldb::SBFunction
&operator=(const lldb::SBFunction
&rhs
);
29 explicit operator bool() const;
33 const char *GetName() const;
35 const char *GetDisplayName() const;
37 const char *GetMangledName() const;
39 lldb::SBInstructionList
GetInstructions(lldb::SBTarget target
);
41 lldb::SBInstructionList
GetInstructions(lldb::SBTarget target
,
44 lldb::SBAddress
GetStartAddress();
46 lldb::SBAddress
GetEndAddress();
48 lldb::SBAddressRangeList
GetRanges();
50 const char *GetArgumentName(uint32_t arg_idx
);
52 uint32_t GetPrologueByteSize();
54 lldb::SBType
GetType();
56 lldb::SBBlock
GetBlock();
58 lldb::LanguageType
GetLanguage();
60 bool GetIsOptimized();
62 bool operator==(const lldb::SBFunction
&rhs
) const;
64 bool operator!=(const lldb::SBFunction
&rhs
) const;
66 bool GetDescription(lldb::SBStream
&description
);
69 lldb_private::Function
*get();
71 void reset(lldb_private::Function
*lldb_object_ptr
);
74 friend class SBAddress
;
76 friend class SBSymbolContext
;
78 SBFunction(lldb_private::Function
*lldb_object_ptr
);
80 lldb_private::Function
*m_opaque_ptr
= nullptr;
85 #endif // LLDB_API_SBFUNCTION_H