Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:56

0001 //===-- ThreadPlanCallUserExpression.h --------------------------------*- C++
0002 //-*-===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef LLDB_TARGET_THREADPLANCALLUSEREXPRESSION_H
0011 #define LLDB_TARGET_THREADPLANCALLUSEREXPRESSION_H
0012 
0013 #include "lldb/Target/Thread.h"
0014 #include "lldb/Target/ThreadPlan.h"
0015 #include "lldb/Target/ThreadPlanCallFunction.h"
0016 #include "lldb/lldb-private.h"
0017 
0018 #include "llvm/ADT/ArrayRef.h"
0019 
0020 namespace lldb_private {
0021 
0022 class ThreadPlanCallUserExpression : public ThreadPlanCallFunction {
0023 public:
0024   ThreadPlanCallUserExpression(Thread &thread, Address &function,
0025                                llvm::ArrayRef<lldb::addr_t> args,
0026                                const EvaluateExpressionOptions &options,
0027                                lldb::UserExpressionSP &user_expression_sp);
0028 
0029   ~ThreadPlanCallUserExpression() override;
0030 
0031   void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
0032 
0033   void DidPush() override;
0034 
0035   void DidPop() override;
0036 
0037   lldb::StopInfoSP GetRealStopInfo() override;
0038 
0039   bool MischiefManaged() override;
0040 
0041   void TransferExpressionOwnership() { m_manage_materialization = true; }
0042 
0043   lldb::ExpressionVariableSP GetExpressionVariable() override {
0044     return m_result_var_sp;
0045   }
0046 
0047 protected:
0048   void DoTakedown(bool success) override;
0049 private:
0050   lldb::UserExpressionSP
0051       m_user_expression_sp; // This is currently just used to ensure the
0052                             // User expression the initiated this ThreadPlan
0053                             // lives as long as the thread plan does.
0054   bool m_manage_materialization = false;
0055   lldb::ExpressionVariableSP
0056       m_result_var_sp; // If we are left to manage the materialization,
0057                        // then stuff the result expression variable here.
0058 
0059   ThreadPlanCallUserExpression(const ThreadPlanCallUserExpression &) = delete;
0060   const ThreadPlanCallUserExpression &
0061   operator=(const ThreadPlanCallUserExpression &) = delete;
0062 };
0063 
0064 } // namespace lldb_private
0065 
0066 #endif // LLDB_TARGET_THREADPLANCALLUSEREXPRESSION_H