Skip to content

Commit

Permalink
rewording docstrings of RegId and Register traits
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashk0 committed Sep 5, 2020
1 parent a2862ab commit fbdd3d4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/arch/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::internal::BeBytes;
///
/// These identifiers are used by GDB for single register operations.
pub trait RegId: Sized {
/// Map raw GDB register number to a (RegId, register size).
/// Map raw GDB register number corresponding `RegId` and register size.
///
/// Returns `None` if the register is not available.
fn from_raw_id(id: usize) -> Option<(Self, usize)>;
Expand All @@ -31,8 +31,12 @@ impl RegId for () {
pub trait Registers: Default {
/// Register identifier for addressing single registers.
///
/// If your target does not implement that feature, you can use `RegId = ()`
/// as a default, which implements the `RegId` trait.
/// Architectures that do not implement single register read can safely use
/// `RegId = ()` as a default.
///
/// **Note**: the use `RegId = ()` in most architectures is temporary.
/// Contributions to implement `RegId` for architectures are welcome! Feel
/// free to open an issue/PR to get some support.
type RegId: RegId;

/// Serialize `self` into a GDB register bytestream.
Expand Down

0 comments on commit fbdd3d4

Please sign in to comment.