LLDB  mainline
ThreadPlanCallUserExpression.h
Go to the documentation of this file.
1 //===-- ThreadPlanCallUserExpression.h --------------------------------*- C++
2 //-*-===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLDB_TARGET_THREADPLANCALLUSEREXPRESSION_H
11 #define LLDB_TARGET_THREADPLANCALLUSEREXPRESSION_H
12 
13 #include "lldb/Target/Thread.h"
14 #include "lldb/Target/ThreadPlan.h"
16 #include "lldb/lldb-private.h"
17 
18 #include "llvm/ADT/ArrayRef.h"
19 
20 namespace lldb_private {
21 
23 public:
24  ThreadPlanCallUserExpression(Thread &thread, Address &function,
25  llvm::ArrayRef<lldb::addr_t> args,
26  const EvaluateExpressionOptions &options,
27  lldb::UserExpressionSP &user_expression_sp);
28 
30 
31  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
32 
33  void DidPush() override;
34 
35  void DidPop() override;
36 
37  lldb::StopInfoSP GetRealStopInfo() override;
38 
39  bool MischiefManaged() override;
40 
42 
43  lldb::ExpressionVariableSP GetExpressionVariable() override {
44  return m_result_var_sp;
45  }
46 
47 protected:
48  void DoTakedown(bool success) override;
49 private:
50  lldb::UserExpressionSP
51  m_user_expression_sp; // This is currently just used to ensure the
52  // User expression the initiated this ThreadPlan
53  // lives as long as the thread plan does.
55  lldb::ExpressionVariableSP
56  m_result_var_sp; // If we are left to manage the materialization,
57  // then stuff the result expression variable here.
58 
61  operator=(const ThreadPlanCallUserExpression &) = delete;
62 };
63 
64 } // namespace lldb_private
65 
66 #endif // LLDB_TARGET_THREADPLANCALLUSEREXPRESSION_H
lldb_private::ThreadPlanCallUserExpression::ThreadPlanCallUserExpression
ThreadPlanCallUserExpression(Thread &thread, Address &function, llvm::ArrayRef< lldb::addr_t > args, const EvaluateExpressionOptions &options, lldb::UserExpressionSP &user_expression_sp)
Definition: ThreadPlanCallUserExpression.cpp:34
lldb_private::ThreadPlanCallUserExpression::DoTakedown
void DoTakedown(bool success) override
Definition: ThreadPlanCallUserExpression.cpp:114
lldb_private::ThreadPlanCallUserExpression::TransferExpressionOwnership
void TransferExpressionOwnership()
Definition: ThreadPlanCallUserExpression.h:41
lldb_private::EvaluateExpressionOptions
Definition: Target.h:259
lldb_private::Stream
Definition: Stream.h:28
lldb_private::ThreadPlanCallUserExpression::m_user_expression_sp
lldb::UserExpressionSP m_user_expression_sp
Definition: ThreadPlanCallUserExpression.h:51
lldb_private::ThreadPlanCallUserExpression::DidPush
void DidPush() override
Definition: ThreadPlanCallUserExpression.cpp:56
lldb_private::ThreadPlanCallFunction
Definition: ThreadPlanCallFunction.h:20
lldb_private::ThreadPlanCallUserExpression::GetRealStopInfo
lldb::StopInfoSP GetRealStopInfo() override
Definition: ThreadPlanCallUserExpression.cpp:99
lldb_private::ThreadPlanCallUserExpression::MischiefManaged
bool MischiefManaged() override
Definition: ThreadPlanCallUserExpression.cpp:68
lldb_private::ThreadPlanCallUserExpression
Definition: ThreadPlanCallUserExpression.h:22
lldb_private::Thread
Definition: Thread.h:60
lldb_private::ThreadPlanCallUserExpression::~ThreadPlanCallUserExpression
~ThreadPlanCallUserExpression() override
lldb_private::ThreadPlanCallUserExpression::m_result_var_sp
lldb::ExpressionVariableSP m_result_var_sp
Definition: ThreadPlanCallUserExpression.h:56
lldb_private::ThreadPlanCallUserExpression::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
Definition: ThreadPlanCallUserExpression.cpp:48
Thread.h
ThreadPlanCallFunction.h
lldb-private.h
ThreadPlan.h
lldb_private::ThreadPlanCallUserExpression::operator=
const ThreadPlanCallUserExpression & operator=(const ThreadPlanCallUserExpression &)=delete
lldb_private::Address
Definition: Address.h:59
lldb_private::ThreadPlanCallUserExpression::DidPop
void DidPop() override
Definition: ThreadPlanCallUserExpression.cpp:62
lldb_private::ThreadPlanCallUserExpression::m_manage_materialization
bool m_manage_materialization
Definition: ThreadPlanCallUserExpression.h:54
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ThreadPlanCallUserExpression::GetExpressionVariable
lldb::ExpressionVariableSP GetExpressionVariable() override
Definition: ThreadPlanCallUserExpression.h:43
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207