LLDB  mainline
StopInfoMachException.h
Go to the documentation of this file.
1 //===-- StopInfoMachException.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 
9 #ifndef liblldb_StopInfoMachException_h_
10 #define liblldb_StopInfoMachException_h_
11 
12 #include <string>
13 
14 #include "lldb/Target/StopInfo.h"
15 
16 namespace lldb_private {
17 
19 public:
20  // Constructors and Destructors
22  uint32_t exc_data_count, uint64_t exc_code,
23  uint64_t exc_subcode)
24  : StopInfo(thread, exc_type), m_exc_data_count(exc_data_count),
25  m_exc_code(exc_code), m_exc_subcode(exc_subcode) {}
26 
27  ~StopInfoMachException() override = default;
28 
29  lldb::StopReason GetStopReason() const override {
31  }
32 
33  const char *GetDescription() override;
34 
35  // Since some mach exceptions will be reported as breakpoints, signals,
36  // or trace, we use this static accessor which will translate the mach
37  // exception into the correct StopInfo.
38  static lldb::StopInfoSP CreateStopReasonWithMachException(
39  Thread &thread, uint32_t exc_type, uint32_t exc_data_count,
40  uint64_t exc_code, uint64_t exc_sub_code, uint64_t exc_sub_sub_code,
41  bool pc_already_adjusted = true, bool adjust_pc_if_needed = false);
42 
43 protected:
45  uint64_t m_exc_code;
46  uint64_t m_exc_subcode;
47 };
48 
49 } // namespace lldb_private
50 
51 #endif // liblldb_StopInfoMachException_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
static lldb::StopInfoSP CreateStopReasonWithMachException(Thread &thread, uint32_t exc_type, uint32_t exc_data_count, uint64_t exc_code, uint64_t exc_sub_code, uint64_t exc_sub_sub_code, bool pc_already_adjusted=true, bool adjust_pc_if_needed=false)
StopInfoMachException(Thread &thread, uint32_t exc_type, uint32_t exc_data_count, uint64_t exc_code, uint64_t exc_subcode)
lldb::StopReason GetStopReason() const override
~StopInfoMachException() override=default