StoppointCallbackContext.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //===-- StoppointCallbackContext.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. #ifndef LLDB_BREAKPOINT_STOPPOINTCALLBACKCONTEXT_H
  9. #define LLDB_BREAKPOINT_STOPPOINTCALLBACKCONTEXT_H
  10. #include "lldb/Target/ExecutionContext.h"
  11. #include "lldb/lldb-private.h"
  12. namespace lldb_private {
  13. /// \class StoppointCallbackContext StoppointCallbackContext.h
  14. /// "lldb/Breakpoint/StoppointCallbackContext.h" Class holds the information
  15. /// that a breakpoint callback needs to evaluate this stop.
  16. /// General Outline:
  17. /// When we hit a breakpoint we need to package up whatever information is
  18. /// needed to evaluate breakpoint commands and conditions. This class is the
  19. /// container of that information.
  20. class StoppointCallbackContext {
  21. public:
  22. StoppointCallbackContext();
  23. StoppointCallbackContext(Event *event, const ExecutionContext &exe_ctx,
  24. bool synchronously = false);
  25. /// Clear the object's state.
  26. ///
  27. /// Sets the event, process and thread to NULL, and the frame index to an
  28. /// invalid value.
  29. void Clear();
  30. // Member variables
  31. Event *event; // This is the event, the callback can modify this to indicate
  32. // the meaning of the breakpoint hit
  33. ExecutionContextRef
  34. exe_ctx_ref; // This tells us where we have stopped, what thread.
  35. bool is_synchronous; // Is the callback being executed synchronously with the
  36. // breakpoint,
  37. // or asynchronously as the event is retrieved?
  38. };
  39. } // namespace lldb_private
  40. #endif // LLDB_BREAKPOINT_STOPPOINTCALLBACKCONTEXT_H