[][src]Trait gdbstub::arch::Arch

pub trait Arch {
    type Usize: PrimInt + Unsigned + BeBytes + LeBytes;
    type Registers: Registers;
    type RegId: RegId;
    fn target_description_xml() -> Option<&'static str> { ... }
}

Encodes architecture-specific information, such as pointer size, register layout, etc...

Types implementing Arch should be Zero-variant Enums, as they are only ever used at the type level, and should never be instantiated.

Associated Types

type Usize: PrimInt + Unsigned + BeBytes + LeBytes

The architecture's pointer size (e.g: u32 on a 32-bit system).

type Registers: Registers

The architecture's register file.

type RegId: RegId

Register identifier enum/struct.

Used to access individual registers via Target::read/write_register.

NOTE: The RegId type is not required to have a 1:1 correspondence with the Registers type, and may include register identifiers which are separate from the main Registers structure.

Loading content...

Provided methods

fn target_description_xml() -> Option<&'static str>

(optional) Return the platform's features.xml file.

Implementing this method enables gdb to automatically detect the target's architecture, saving the hassle of having to run set architecture <arch> when starting a debugging session.

These descriptions can be quite succinct. For example, the target description for an armv4t platform can be as simple as:

r#"<target version="1.0"><architecture>armv4t</architecture></target>"#

See the GDB docs for details on the target description XML format.

Loading content...

Implementors

impl Arch for Armv4t[src]

impl Arch for Riscv32[src]

impl Arch for Riscv64[src]

impl<RegIdImpl: RegId> Arch for Mips64<RegIdImpl>[src]

type Usize = u64

type Registers = MipsCoreRegs<u64>

type RegId = RegIdImpl

impl<RegIdImpl: RegId> Arch for Mips<RegIdImpl>[src]

type Usize = u32

type Registers = MipsCoreRegs<u32>

type RegId = RegIdImpl

impl<RegIdImpl: RegId> Arch for Msp430<RegIdImpl>[src]

type Usize = u32

type Registers = Msp430Regs

type RegId = RegIdImpl

impl<RegIdImpl: RegId> Arch for PowerPcAltivec32<RegIdImpl>[src]

type Usize = u32

type Registers = PowerPcCommonRegs

type RegId = RegIdImpl

impl<RegIdImpl: RegId> Arch for X86_64_SSE<RegIdImpl>[src]

type Usize = u64

type Registers = X86_64CoreRegs

type RegId = RegIdImpl

impl<RegIdImpl: RegId> Arch for X86_SSE<RegIdImpl>[src]

type Usize = u32

type Registers = X86CoreRegs

type RegId = RegIdImpl

Loading content...