From 7adb9e73813bbcd0dafb95e76598794aa85130ca Mon Sep 17 00:00:00 2001 From: edef Date: Thu, 16 Apr 2015 07:10:34 -0400 Subject: [PATCH] implement Debug for all components of Context --- src/arch/x86_64/mod.rs | 2 ++ src/context.rs | 1 + src/debug/mod.rs | 1 + 3 files changed, 4 insertions(+) diff --git a/src/arch/x86_64/mod.rs b/src/arch/x86_64/mod.rs index 1dff81b..73625e8 100644 --- a/src/arch/x86_64/mod.rs +++ b/src/arch/x86_64/mod.rs @@ -7,6 +7,8 @@ use super::common::{push, rust_trampoline}; pub const STACK_ALIGN: usize = 16; +#[allow(raw_pointer_derive)] +#[derive(Debug)] pub struct Registers { rsp: *mut usize } diff --git a/src/context.rs b/src/context.rs index f4a5e71..39ebdd9 100644 --- a/src/context.rs +++ b/src/context.rs @@ -6,6 +6,7 @@ use arch::Registers; use stack; use debug::StackId; +#[derive(Debug)] pub struct Context<'a, Stack: stack::Stack> { regs: Registers, _stack_id: StackId, diff --git a/src/debug/mod.rs b/src/debug/mod.rs index aee886b..b215b98 100644 --- a/src/debug/mod.rs +++ b/src/debug/mod.rs @@ -5,6 +5,7 @@ use stack; mod valgrind; +#[derive(Debug)] pub struct StackId(valgrind::stack_id_t); impl StackId {