LLDB
mainline
llvm-project
lldb
include
lldb
Target
AppleArm64ExceptionClass.h
Go to the documentation of this file.
1
//===-- AppleArm64ExceptionClass.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 LLDB_TARGET_APPLEARM64EXCEPTIONCLASS_H
10
#define LLDB_TARGET_APPLEARM64EXCEPTIONCLASS_H
11
12
#include <cstdint>
13
14
namespace
lldb_private
{
15
16
enum class
AppleArm64ExceptionClass
: unsigned {
17
#define APPLE_ARM64_EXCEPTION_CLASS(Name, Code) Name = Code,
18
#include "AppleArm64ExceptionClass.def"
19
};
20
21
/// Get the Apple ARM64 exception class encoded within \p esr.
22
inline
AppleArm64ExceptionClass
getAppleArm64ExceptionClass
(
uint32_t
esr) {
23
/*
24
* Exception Syndrome Register
25
*
26
* 31 26 25 24 0
27
* +------+--+------------------+
28
* | EC |IL| ISS |
29
* +------+--+------------------+
30
*
31
* EC - Exception Class
32
* IL - Instruction Length
33
* ISS - Instruction Specific Syndrome
34
*/
35
return
static_cast<
AppleArm64ExceptionClass
>
(esr >> 26);
36
}
37
38
inline
const
char
*
toString
(
AppleArm64ExceptionClass
EC) {
39
switch
(EC) {
40
#define APPLE_ARM64_EXCEPTION_CLASS(Name, Code) \
41
case AppleArm64ExceptionClass::Name: \
42
return #Name;
43
#include "AppleArm64ExceptionClass.def"
44
}
45
return
"Unknown Exception Class"
;
46
}
47
48
}
// namespace lldb_private
49
50
#endif // LLDB_TARGET_APPLEARM64EXCEPTIONCLASS_H
lldb_private::toString
const char * toString(AppleArm64ExceptionClass EC)
Definition:
AppleArm64ExceptionClass.h:38
uint32_t
lldb_private::getAppleArm64ExceptionClass
AppleArm64ExceptionClass getAppleArm64ExceptionClass(uint32_t esr)
Get the Apple ARM64 exception class encoded within esr.
Definition:
AppleArm64ExceptionClass.h:22
lldb_private
A class that represents a running process on the host machine.
Definition:
SBCommandInterpreterRunOptions.h:16
lldb_private::AppleArm64ExceptionClass
AppleArm64ExceptionClass
Definition:
AppleArm64ExceptionClass.h:16
Generated on Sat Jan 28 2023 15:36:05 for LLDB by
1.8.17