LLDB
mainline
llvm-project
lldb
source
Plugins
ExpressionParser
Clang
ClangExpressionVariable.cpp
Go to the documentation of this file.
1
//===-- ClangExpressionVariable.cpp ---------------------------------------===//
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
#include "
ClangExpressionVariable.h
"
10
11
#include "
lldb/Core/Value.h
"
12
#include "
lldb/Target/ExecutionContext.h
"
13
#include "
lldb/Target/Process.h
"
14
#include "
lldb/Utility/ConstString.h
"
15
#include "
lldb/Utility/DataExtractor.h
"
16
#include "
lldb/Utility/Stream.h
"
17
#include "
lldb/ValueObject/ValueObjectConstResult.h
"
18
#include "clang/AST/ASTContext.h"
19
20
using namespace
lldb_private
;
21
using namespace
clang
;
22
23
char
ClangExpressionVariable::ID
;
24
25
ClangExpressionVariable::ClangExpressionVariable
(
26
ExecutionContextScope
*exe_scope,
lldb::ByteOrder
byte_order,
27
uint32_t addr_byte_size)
28
: m_parser_vars(), m_jit_vars() {
29
m_flags = EVNone;
30
m_frozen_sp =
31
ValueObjectConstResult::Create
(exe_scope, byte_order, addr_byte_size);
32
}
33
34
ClangExpressionVariable::ClangExpressionVariable
(
35
ExecutionContextScope
*exe_scope,
Value
&value,
ConstString
name,
36
uint16_t flags)
37
: m_parser_vars(), m_jit_vars() {
38
m_flags = flags;
39
m_frozen_sp =
ValueObjectConstResult::Create
(exe_scope, value, name);
40
}
41
42
ClangExpressionVariable::ClangExpressionVariable
(
43
const
lldb::ValueObjectSP
&valobj_sp)
44
: m_parser_vars(), m_jit_vars() {
45
m_flags = EVNone;
46
m_frozen_sp = valobj_sp;
47
}
48
49
ClangExpressionVariable::ClangExpressionVariable
(
50
ExecutionContextScope
*exe_scope,
ConstString
name,
51
const
TypeFromUser
&user_type,
lldb::ByteOrder
byte_order,
52
uint32_t addr_byte_size)
53
: m_parser_vars(), m_jit_vars() {
54
m_flags = EVNone;
55
m_frozen_sp =
56
ValueObjectConstResult::Create
(exe_scope, byte_order, addr_byte_size);
57
SetName(name);
58
SetCompilerType(user_type);
59
}
60
61
TypeFromUser
ClangExpressionVariable::GetTypeFromUser
() {
62
TypeFromUser
tfu(m_frozen_sp->GetCompilerType());
63
return
tfu;
64
}
ClangExpressionVariable.h
ConstString.h
DataExtractor.h
ExecutionContext.h
Process.h
Stream.h
ValueObjectConstResult.h
Value.h
lldb_private::ClangExpressionVariable::ClangExpressionVariable
ClangExpressionVariable(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size)
Definition:
ClangExpressionVariable.cpp:25
lldb_private::ClangExpressionVariable::GetTypeFromUser
TypeFromUser GetTypeFromUser()
Definition:
ClangExpressionVariable.cpp:61
lldb_private::ClangExpressionVariable::ID
static char ID
Definition:
ClangExpressionVariable.h:64
lldb_private::ConstString
A uniqued constant string class.
Definition:
ConstString.h:40
lldb_private::ExecutionContextScope
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
Definition:
ExecutionContextScope.h:32
lldb_private::TaggedASTType< 1 >
lldb_private::ValueObjectConstResult::Create
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size, lldb::addr_t address=LLDB_INVALID_ADDRESS)
Definition:
ValueObjectConstResult.cpp:29
lldb_private::Value
Definition:
Value.h:38
clang
Definition:
ASTResultSynthesizer.h:15
lldb_private
A class that represents a running process on the host machine.
Definition:
SBAddressRange.h:14
lldb::ValueObjectSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition:
lldb-forward.h:484
lldb::ByteOrder
ByteOrder
Byte ordering definitions.
Definition:
lldb-enumerations.h:139
Generated on Fri Dec 20 2024 17:27:20 for LLDB by
1.9.6