1 //! Implementations for various PowerPC architectures. 2 3 use gdbstub::arch::{Arch, RegId, SingleStepGdbBehavior}; 4 5 pub mod reg; 6 7 /// Implements `Arch` for 32-bit PowerPC + AltiVec SIMD. 8 /// 9 /// Check out the [module level docs](gdbstub::arch#whats-with-regidimpl) for 10 /// more info about the `RegIdImpl` type parameter. 11 pub enum PowerPcAltivec32<RegIdImpl: RegId> { 12 #[doc(hidden)] 13 _Marker(core::marker::PhantomData<RegIdImpl>), 14 } 15 16 impl<RegIdImpl: RegId> Arch for PowerPcAltivec32<RegIdImpl> { 17 type Usize = u32; 18 type Registers = reg::PowerPcCommonRegs; 19 type RegId = RegIdImpl; 20 type BreakpointKind = usize; 21 target_description_xml() -> Option<&'static str>22 fn target_description_xml() -> Option<&'static str> { 23 Some( 24 r#"<target version="1.0"><architecture>powerpc:common</architecture><feature name="org.gnu.gdb.power.core"></feature><feature name="org.gnu.gdb.power.fpu"></feature><feature name="org.gnu.gdb.power.altivec"></feature></target>"#, 25 ) 26 } 27 28 #[inline(always)] single_step_gdb_behavior() -> SingleStepGdbBehavior29 fn single_step_gdb_behavior() -> SingleStepGdbBehavior { 30 SingleStepGdbBehavior::Required 31 } 32 } 33