1254721Semaste//===-- StoppointCallbackContext.h ------------------------------*- C++ -*-===// 2254721Semaste// 3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim// See https://llvm.org/LICENSE.txt for license information. 5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6254721Semaste// 7254721Semaste//===----------------------------------------------------------------------===// 8254721Semaste 9254721Semaste#ifndef liblldb_StoppointCallbackContext_h_ 10254721Semaste#define liblldb_StoppointCallbackContext_h_ 11254721Semaste 12314564Sdim#include "lldb/Target/ExecutionContext.h" 13254721Semaste#include "lldb/lldb-private.h" 14254721Semaste 15254721Semastenamespace lldb_private { 16254721Semaste 17353358Sdim/// \class StoppointCallbackContext StoppointCallbackContext.h 18341825Sdim/// "lldb/Breakpoint/StoppointCallbackContext.h" Class holds the information 19341825Sdim/// that a breakpoint callback needs to evaluate this stop. 20254721Semaste 21254721Semaste/// General Outline: 22314564Sdim/// When we hit a breakpoint we need to package up whatever information is 23341825Sdim/// needed to evaluate breakpoint commands and conditions. This class is the 24341825Sdim/// container of that information. 25254721Semaste 26314564Sdimclass StoppointCallbackContext { 27254721Semastepublic: 28314564Sdim StoppointCallbackContext(); 29254721Semaste 30314564Sdim StoppointCallbackContext(Event *event, const ExecutionContext &exe_ctx, 31314564Sdim bool synchronously = false); 32254721Semaste 33314564Sdim /// Clear the object's state. 34314564Sdim /// 35314564Sdim /// Sets the event, process and thread to NULL, and the frame index to an 36314564Sdim /// invalid value. 37314564Sdim void Clear(); 38254721Semaste 39314564Sdim // Member variables 40314564Sdim Event *event; // This is the event, the callback can modify this to indicate 41314564Sdim // the meaning of the breakpoint hit 42314564Sdim ExecutionContextRef 43314564Sdim exe_ctx_ref; // This tells us where we have stopped, what thread. 44314564Sdim bool is_synchronous; // Is the callback being executed synchronously with the 45314564Sdim // breakpoint, 46314564Sdim // or asynchronously as the event is retrieved? 47254721Semaste}; 48254721Semaste 49254721Semaste} // namespace lldb_private 50254721Semaste 51314564Sdim#endif // liblldb_StoppointCallbackContext_h_ 52