LLDB mainline
SBBlock.h
Go to the documentation of this file.
1//===-- SBBlock.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_API_SBBLOCK_H
10#define LLDB_API_SBBLOCK_H
11
14#include "lldb/API/SBDefines.h"
15#include "lldb/API/SBFrame.h"
16#include "lldb/API/SBTarget.h"
18#include "lldb/lldb-types.h"
19
20namespace lldb {
21
23public:
24 SBBlock();
25
26 SBBlock(const lldb::SBBlock &rhs);
27
28 ~SBBlock();
29
30 const lldb::SBBlock &operator=(const lldb::SBBlock &rhs);
31
32 bool IsInlined() const;
33
34 explicit operator bool() const;
35
36 bool operator==(const lldb::SBBlock &rhs) const;
37
38 bool operator!=(const lldb::SBBlock &rhs) const;
39
40 bool IsValid() const;
41
42 const char *GetInlinedName() const;
43
45
46 uint32_t GetInlinedCallSiteLine() const;
47
48 uint32_t GetInlinedCallSiteColumn() const;
49
51
53
55
56 uint32_t GetNumRanges();
57
59
61
63
65
66 lldb::SBValueList GetVariables(lldb::SBFrame &frame, bool arguments,
67 bool locals, bool statics,
68 lldb::DynamicValueType use_dynamic);
69
70 lldb::SBValueList GetVariables(lldb::SBTarget &target, bool arguments,
71 bool locals, bool statics);
72 /// Get the inlined block that contains this block.
73 ///
74 /// \return
75 /// If this block is inlined, it will return this block, else
76 /// parent blocks will be searched to see if any contain this
77 /// block and are themselves inlined. An invalid SBBlock will
78 /// be returned if this block nor any parent blocks are inlined
79 /// function blocks.
81
82 bool GetDescription(lldb::SBStream &description);
83
84private:
85 friend class SBAddress;
86 friend class SBFrame;
87 friend class SBFunction;
88 friend class SBSymbolContext;
89
91
92 void SetPtr(lldb_private::Block *lldb_object_ptr);
93
94 SBBlock(lldb_private::Block *lldb_object_ptr);
95
96 void AppendVariables(bool can_create, bool get_parent_variables,
98
100};
101
102} // namespace lldb
103
104#endif // LLDB_API_SBBLOCK_H
static llvm::Expected< llvm::DWARFAddressRangesVector > GetRanges(DWARFUnit &unit, const DWARFFormValue &value)
#define LLDB_API
Definition SBDefines.h:28
void AppendVariables(bool can_create, bool get_parent_variables, lldb_private::VariableList *var_list)
Definition SBBlock.cpp:130
lldb::SBAddress GetRangeEndAddress(uint32_t idx)
Definition SBBlock.cpp:224
uint32_t GetNumRanges()
Definition SBBlock.cpp:203
const char * GetInlinedName() const
Definition SBBlock.cpp:80
uint32_t GetInlinedCallSiteLine() const
Definition SBBlock.cpp:106
friend class SBSymbolContext
Definition SBBlock.h:88
lldb::SBAddress GetRangeStartAddress(uint32_t idx)
Definition SBBlock.cpp:211
bool IsValid() const
Definition SBBlock.cpp:46
const lldb::SBBlock & operator=(const lldb::SBBlock &rhs)
Definition SBBlock.cpp:37
friend class SBAddress
Definition SBBlock.h:85
lldb::SBBlock GetContainingInlinedBlock()
Get the inlined block that contains this block.
Definition SBBlock.cpp:149
uint32_t GetRangeIndexForBlockAddress(lldb::SBAddress block_addr)
Definition SBBlock.cpp:247
lldb::SBValueList GetVariables(lldb::SBFrame &frame, bool arguments, bool locals, bool statics, lldb::DynamicValueType use_dynamic)
Definition SBBlock.cpp:257
void SetPtr(lldb_private::Block *lldb_object_ptr)
Definition SBBlock.cpp:178
lldb::SBBlock GetParent()
Definition SBBlock.cpp:140
lldb::SBBlock GetFirstChild()
Definition SBBlock.cpp:167
bool IsInlined() const
Definition SBBlock.cpp:72
uint32_t GetInlinedCallSiteColumn() const
Definition SBBlock.cpp:118
friend class SBFrame
Definition SBBlock.h:86
bool operator==(const lldb::SBBlock &rhs) const
Definition SBBlock.cpp:56
friend class SBFunction
Definition SBBlock.h:87
lldb::SBBlock GetSibling()
Definition SBBlock.cpp:158
lldb::SBFileSpec GetInlinedCallSiteFile() const
Definition SBBlock.cpp:93
lldb_private::Block * m_opaque_ptr
Definition SBBlock.h:99
lldb_private::Block * GetPtr()
Definition SBBlock.cpp:176
bool operator!=(const lldb::SBBlock &rhs) const
Definition SBBlock.cpp:66
bool GetDescription(lldb::SBStream &description)
Definition SBBlock.cpp:180
A class that describes a single lexical block.
Definition Block.h:41