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
19namespace lldb {
20
22public:
23 SBBlock();
24
25 SBBlock(const lldb::SBBlock &rhs);
26
27 ~SBBlock();
28
29 const lldb::SBBlock &operator=(const lldb::SBBlock &rhs);
30
31 bool IsInlined() const;
32
33 explicit operator bool() const;
34
35 bool IsValid() const;
36
37 const char *GetInlinedName() const;
38
40
41 uint32_t GetInlinedCallSiteLine() const;
42
43 uint32_t GetInlinedCallSiteColumn() const;
44
46
48
50
51 uint32_t GetNumRanges();
52
54
56
58
60
61 lldb::SBValueList GetVariables(lldb::SBFrame &frame, bool arguments,
62 bool locals, bool statics,
63 lldb::DynamicValueType use_dynamic);
64
65 lldb::SBValueList GetVariables(lldb::SBTarget &target, bool arguments,
66 bool locals, bool statics);
67 /// Get the inlined block that contains this block.
68 ///
69 /// \return
70 /// If this block is inlined, it will return this block, else
71 /// parent blocks will be searched to see if any contain this
72 /// block and are themselves inlined. An invalid SBBlock will
73 /// be returned if this block nor any parent blocks are inlined
74 /// function blocks.
76
77 bool GetDescription(lldb::SBStream &description);
78
79private:
80 friend class SBAddress;
81 friend class SBFrame;
82 friend class SBFunction;
83 friend class SBSymbolContext;
84
86
87 void SetPtr(lldb_private::Block *lldb_object_ptr);
88
89 SBBlock(lldb_private::Block *lldb_object_ptr);
90
91 void AppendVariables(bool can_create, bool get_parent_variables,
93
95};
96
97} // namespace lldb
98
99#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:115
lldb::SBAddress GetRangeEndAddress(uint32_t idx)
Definition SBBlock.cpp:208
uint32_t GetNumRanges()
Definition SBBlock.cpp:187
const char * GetInlinedName() const
Definition SBBlock.cpp:65
uint32_t GetInlinedCallSiteLine() const
Definition SBBlock.cpp:91
friend class SBSymbolContext
Definition SBBlock.h:83
lldb::SBAddress GetRangeStartAddress(uint32_t idx)
Definition SBBlock.cpp:195
bool IsValid() const
Definition SBBlock.cpp:47
const lldb::SBBlock & operator=(const lldb::SBBlock &rhs)
Definition SBBlock.cpp:38
friend class SBAddress
Definition SBBlock.h:80
lldb::SBBlock GetContainingInlinedBlock()
Get the inlined block that contains this block.
Definition SBBlock.cpp:133
uint32_t GetRangeIndexForBlockAddress(lldb::SBAddress block_addr)
Definition SBBlock.cpp:231
lldb::SBValueList GetVariables(lldb::SBFrame &frame, bool arguments, bool locals, bool statics, lldb::DynamicValueType use_dynamic)
Definition SBBlock.cpp:241
void SetPtr(lldb_private::Block *lldb_object_ptr)
Definition SBBlock.cpp:162
lldb::SBBlock GetParent()
Definition SBBlock.cpp:124
lldb::SBBlock GetFirstChild()
Definition SBBlock.cpp:151
bool IsInlined() const
Definition SBBlock.cpp:57
uint32_t GetInlinedCallSiteColumn() const
Definition SBBlock.cpp:103
friend class SBFrame
Definition SBBlock.h:81
friend class SBFunction
Definition SBBlock.h:82
lldb::SBBlock GetSibling()
Definition SBBlock.cpp:142
lldb::SBFileSpec GetInlinedCallSiteFile() const
Definition SBBlock.cpp:78
lldb_private::Block * m_opaque_ptr
Definition SBBlock.h:94
lldb_private::Block * GetPtr()
Definition SBBlock.cpp:160
bool GetDescription(lldb::SBStream &description)
Definition SBBlock.cpp:164
A class that describes a single lexical block.
Definition Block.h:41