Merge pull request #259 from volcano0dr/exception
add exception vector definition
diff --git a/sgx_signal/src/exception.rs b/sgx_signal/src/exception.rs
index 54e562a..f1a38b9 100644
--- a/sgx_signal/src/exception.rs
+++ b/sgx_signal/src/exception.rs
@@ -154,9 +154,12 @@
sgx_exception_vector_t::SGX_EXCEPTION_VECTOR_BP => "#BP",
sgx_exception_vector_t::SGX_EXCEPTION_VECTOR_BR => "#BR",
sgx_exception_vector_t::SGX_EXCEPTION_VECTOR_UD => "#UD",
+ sgx_exception_vector_t::SGX_EXCEPTION_VECTOR_GP => "#GP",
+ sgx_exception_vector_t::SGX_EXCEPTION_VECTOR_PF => "#PF",
sgx_exception_vector_t::SGX_EXCEPTION_VECTOR_MF => "#MF",
sgx_exception_vector_t::SGX_EXCEPTION_VECTOR_AC => "#AC",
sgx_exception_vector_t::SGX_EXCEPTION_VECTOR_XM => "#XM",
+ sgx_exception_vector_t::SGX_EXCEPTION_VECTOR_CP => "#CP",
};
panic!("enclave exception: {}, at rip: 0x{:x}", exception, rip);
}
diff --git a/sgx_types/src/types.rs b/sgx_types/src/types.rs
index e09195e..143e5a4 100644
--- a/sgx_types/src/types.rs
+++ b/sgx_types/src/types.rs
@@ -865,9 +865,12 @@
SGX_EXCEPTION_VECTOR_BP = 3, /* INT 3 instruction */
SGX_EXCEPTION_VECTOR_BR = 5, /* BOUND instruction */
SGX_EXCEPTION_VECTOR_UD = 6, /* UD2 instruction or reserved opcode */
+ SGX_EXCEPTION_VECTOR_GP = 13, /* General protection exception */
+ SGX_EXCEPTION_VECTOR_PF = 14, /* Page fault exception */
SGX_EXCEPTION_VECTOR_MF = 16, /* x87 FPU floating-point or WAIT/FWAIT instruction */
SGX_EXCEPTION_VECTOR_AC = 17, /* Any data reference in memory */
SGX_EXCEPTION_VECTOR_XM = 19, /* SSE/SSE2/SSE3 floating-point instruction */
+ SGX_EXCEPTION_VECTOR_CP = 21, /* Control protection exception */
}
}