libintrovirt
v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
Exception.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2021 Assured Information Security, Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#pragma once
17
18
#include <ostream>
19
#include <string>
20
21
namespace
introvirt
{
22
namespace
x86 {
23
27
enum class
Exception
{
28
DIVIDE_ERROR
= 0,
29
DEBUG
= 1,
30
NMI
= 2,
31
INT3
= 3,
32
OVERFLOW
= 4,
33
BOUNDS
= 5,
34
INVALID_OP
= 6,
35
NO_DEVICE
= 7,
36
DOUBLE_FAULT
= 8,
37
COPRO_SEG
= 9,
38
INVALID_TSS
= 10,
39
NO_SEGMENT
= 11,
40
STACK_ERROR
= 12,
41
GP_FAULT
= 13,
42
PAGE_FAULT
= 14,
43
SPURIOUS_INT
= 15,
44
COPRO_ERROR
= 16,
45
ALIGNMENT_CHECK
= 17,
46
MACHINE_CHECK
= 18,
47
SIMD_ERROR
= 19,
48
49
UNKNOWN
= -1,
50
};
51
58
const
std::string&
to_string
(
Exception
exception);
59
67
std::ostream&
operator<<
(std::ostream& os,
Exception
exception);
68
69
}
// namespace x86
70
}
// namespace introvirt
introvirt::x86::operator<<
std::ostream & operator<<(std::ostream &os, Exception exception)
Stream output operator for Exception.
introvirt::x86::Exception
Exception
x86 exception codes
Definition
Exception.hh:27
introvirt::x86::Exception::OVERFLOW
@ OVERFLOW
introvirt::x86::Exception::ALIGNMENT_CHECK
@ ALIGNMENT_CHECK
introvirt::x86::Exception::INT3
@ INT3
introvirt::x86::Exception::NO_DEVICE
@ NO_DEVICE
introvirt::x86::Exception::BOUNDS
@ BOUNDS
introvirt::x86::Exception::SPURIOUS_INT
@ SPURIOUS_INT
introvirt::x86::Exception::COPRO_SEG
@ COPRO_SEG
introvirt::x86::Exception::GP_FAULT
@ GP_FAULT
introvirt::x86::Exception::INVALID_TSS
@ INVALID_TSS
introvirt::x86::Exception::DOUBLE_FAULT
@ DOUBLE_FAULT
introvirt::x86::Exception::INVALID_OP
@ INVALID_OP
introvirt::x86::Exception::NO_SEGMENT
@ NO_SEGMENT
introvirt::x86::Exception::UNKNOWN
@ UNKNOWN
introvirt::x86::Exception::MACHINE_CHECK
@ MACHINE_CHECK
introvirt::x86::Exception::PAGE_FAULT
@ PAGE_FAULT
introvirt::x86::Exception::NMI
@ NMI
introvirt::x86::Exception::COPRO_ERROR
@ COPRO_ERROR
introvirt::x86::Exception::SIMD_ERROR
@ SIMD_ERROR
introvirt::x86::Exception::DIVIDE_ERROR
@ DIVIDE_ERROR
introvirt::x86::Exception::STACK_ERROR
@ STACK_ERROR
introvirt::x86::Exception::DEBUG
@ DEBUG
introvirt::x86::to_string
const std::string & to_string(Exception exception)
Convert an Exception enum value to a std::string.
introvirt
Core IntroVirt classes.
Definition
Cr0.hh:20