1 //===-- StopInfoMachException.h ---------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_StopInfoMachException_h_
11 #define liblldb_StopInfoMachException_h_
17 // Other libraries and framework includes
19 #include "lldb/Target/StopInfo.h"
21 namespace lldb_private {
23 class StopInfoMachException : public StopInfo
26 //------------------------------------------------------------------
27 // Constructors and Destructors
28 //------------------------------------------------------------------
29 StopInfoMachException (Thread &thread,
31 uint32_t exc_data_count,
33 uint64_t exc_subcode) :
34 StopInfo (thread, exc_type),
35 m_exc_data_count (exc_data_count),
36 m_exc_code (exc_code),
37 m_exc_subcode (exc_subcode)
41 ~StopInfoMachException() override = default;
44 GetStopReason() const override
46 return lldb::eStopReasonException;
50 GetDescription() override;
52 // Since some mach exceptions will be reported as breakpoints, signals,
53 // or trace, we use this static accessor which will translate the mach
54 // exception into the correct StopInfo.
55 static lldb::StopInfoSP
56 CreateStopReasonWithMachException (Thread &thread,
58 uint32_t exc_data_count,
60 uint64_t exc_sub_code,
61 uint64_t exc_sub_sub_code,
62 bool pc_already_adjusted = true,
63 bool adjust_pc_if_needed = false);
66 uint32_t m_exc_data_count;
68 uint64_t m_exc_subcode;
71 } // namespace lldb_private
73 #endif // liblldb_StopInfoMachException_h_