1 //! Implementation for the [AArch64](https://developer.arm.com/documentation/102374) 2 //! ARM architecture. 3 //! 4 //! See PR [#109](https://github.com/daniel5151/gdbstub/pull/109) for more info. 5 //! 6 //! *Note*: doesn't support the AArch32 execution mode. 7 //! *Note*: the target XML currently advertises all system registers to the GDB 8 //! client. 9 10 use gdbstub::arch::Arch; 11 12 pub mod reg; 13 14 /// Implements `Arch` for ARM AArch64. 15 pub struct AArch64 {} 16 17 impl Arch for AArch64 { 18 type Usize = u64; 19 type Registers = reg::AArch64CoreRegs; 20 type RegId = reg::id::AArch64RegId; 21 type BreakpointKind = usize; 22 target_description_xml() -> Option<&'static str>23 fn target_description_xml() -> Option<&'static str> { 24 static DESCRIPTION_XML: &str = concat!( 25 r#"<target version="1.0">"#, 26 "<architecture>aarch64</architecture>", 27 include_str!("core.xml"), // feature "org.gnu.gdb.aarch64.core" 28 include_str!("fpu.xml"), // feature "org.gnu.gdb.aarch64.fpu" 29 include_str!("sysregs.xml"), 30 "</target>", 31 ); 32 33 Some(DESCRIPTION_XML) 34 } 35 } 36