WIP(ptrace): Better support for signals

Signals now cause an event, and there's a way to continue until the
next signal. I can see this being used for detection of `int3`
although I'm not entirely sure as it may prove being too late to stop
abortion of process.
This commit is contained in:
jD91mZM2
2019-07-21 19:56:19 +02:00
parent 1ee9229c6a
commit 85a45f382c
2 changed files with 10 additions and 6 deletions
+7 -6
View File
@@ -305,21 +305,22 @@ impl DerefMut for FloatRegisters {
#[derive(Clone, Copy)]
#[repr(C)]
pub union PtraceEventContent {
pub union PtraceEventData {
pub clone: usize,
pub signal: usize
}
impl Default for PtraceEventContent {
impl Default for PtraceEventData {
fn default() -> Self {
Self {
clone: 0
clone: 0,
}
}
}
impl fmt::Debug for PtraceEventContent {
impl fmt::Debug for PtraceEventData {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "PtraceEventContent(...)")
write!(f, "PtraceEventData(...)")
}
}
@@ -327,7 +328,7 @@ impl fmt::Debug for PtraceEventContent {
#[repr(C)]
pub struct PtraceEvent {
pub tag: u16,
pub data: PtraceEventContent,
pub data: PtraceEventData,
}
impl Deref for PtraceEvent {