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
21namespace introvirt {
22namespace x86 {
23
27enum 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
58const std::string& to_string(Exception exception);
59
67std::ostream& operator<<(std::ostream& os, Exception exception);
68
69} // namespace x86
70} // namespace introvirt
std::ostream & operator<<(std::ostream &os, Exception exception)
Stream output operator for Exception.
Exception
x86 exception codes
Definition Exception.hh:27
const std::string & to_string(Exception exception)
Convert an Exception enum value to a std::string.
Core IntroVirt classes.
Definition Cr0.hh:20