1 //===-- SBBlock.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 LLDB_SBBlock_h_
11 #define LLDB_SBBlock_h_
13 #include "lldb/API/SBDefines.h"
14 #include "lldb/API/SBFrame.h"
15 #include "lldb/API/SBTarget.h"
16 #include "lldb/API/SBValueList.h"
20 class LLDB_API SBBlock {
24 SBBlock(const lldb::SBBlock &rhs);
28 const lldb::SBBlock &operator=(const lldb::SBBlock &rhs);
30 bool IsInlined() const;
34 const char *GetInlinedName() const;
36 lldb::SBFileSpec GetInlinedCallSiteFile() const;
38 uint32_t GetInlinedCallSiteLine() const;
40 uint32_t GetInlinedCallSiteColumn() const;
42 lldb::SBBlock GetParent();
44 lldb::SBBlock GetSibling();
46 lldb::SBBlock GetFirstChild();
48 uint32_t GetNumRanges();
50 lldb::SBAddress GetRangeStartAddress(uint32_t idx);
52 lldb::SBAddress GetRangeEndAddress(uint32_t idx);
54 uint32_t GetRangeIndexForBlockAddress(lldb::SBAddress block_addr);
56 lldb::SBValueList GetVariables(lldb::SBFrame &frame, bool arguments,
57 bool locals, bool statics,
58 lldb::DynamicValueType use_dynamic);
60 lldb::SBValueList GetVariables(lldb::SBTarget &target, bool arguments,
61 bool locals, bool statics);
62 //------------------------------------------------------------------
63 /// Get the inlined block that contains this block.
66 /// If this block is inlined, it will return this block, else
67 /// parent blocks will be searched to see if any contain this
68 /// block and are themselves inlined. An invalid SBBlock will
69 /// be returned if this block nor any parent blocks are inlined
71 //------------------------------------------------------------------
72 lldb::SBBlock GetContainingInlinedBlock();
74 bool GetDescription(lldb::SBStream &description);
77 friend class SBAddress;
79 friend class SBFunction;
80 friend class SBSymbolContext;
82 lldb_private::Block *GetPtr();
84 void SetPtr(lldb_private::Block *lldb_object_ptr);
86 SBBlock(lldb_private::Block *lldb_object_ptr);
88 void AppendVariables(bool can_create, bool get_parent_variables,
89 lldb_private::VariableList *var_list);
91 lldb_private::Block *m_opaque_ptr;
96 #endif // LLDB_SBBlock_h_