SBFunction.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. #ifndef LLDB_API_SBFUNCTION_H
  9. #define LLDB_API_SBFUNCTION_H
  10. #include "lldb/API/SBAddress.h"
  11. #include "lldb/API/SBDefines.h"
  12. #include "lldb/API/SBInstructionList.h"
  13. namespace lldb {
  14. class LLDB_API SBFunction {
  15. public:
  16. SBFunction();
  17. SBFunction(const lldb::SBFunction &rhs);
  18. const lldb::SBFunction &operator=(const lldb::SBFunction &rhs);
  19. ~SBFunction();
  20. explicit operator bool() const;
  21. bool IsValid() const;
  22. const char *GetName() const;
  23. const char *GetDisplayName() const;
  24. const char *GetMangledName() const;
  25. lldb::SBInstructionList GetInstructions(lldb::SBTarget target);
  26. lldb::SBInstructionList GetInstructions(lldb::SBTarget target,
  27. const char *flavor);
  28. lldb::SBAddress GetStartAddress();
  29. lldb::SBAddress GetEndAddress();
  30. const char *GetArgumentName(uint32_t arg_idx);
  31. uint32_t GetPrologueByteSize();
  32. lldb::SBType GetType();
  33. lldb::SBBlock GetBlock();
  34. lldb::LanguageType GetLanguage();
  35. bool GetIsOptimized();
  36. bool operator==(const lldb::SBFunction &rhs) const;
  37. bool operator!=(const lldb::SBFunction &rhs) const;
  38. bool GetDescription(lldb::SBStream &description);
  39. protected:
  40. lldb_private::Function *get();
  41. void reset(lldb_private::Function *lldb_object_ptr);
  42. private:
  43. friend class SBAddress;
  44. friend class SBFrame;
  45. friend class SBSymbolContext;
  46. SBFunction(lldb_private::Function *lldb_object_ptr);
  47. lldb_private::Function *m_opaque_ptr;
  48. };
  49. } // namespace lldb
  50. #endif // LLDB_API_SBFUNCTION_H