[−][src]Trait gdbstub::arch::Arch
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.
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.