Struct rust_debug::registers::Registers[][src]

pub struct Registers {
    pub registers: HashMap<u16, u32>,
    pub program_counter_register: Option<usize>,
    pub link_register: Option<usize>,
    pub stack_pointer_register: Option<usize>,
    pub cfa: Option<u32>,
    // some fields omitted
}
Expand description

A struct to hold the register values and other register information.

Fields

registers: HashMap<u16, u32>

Holds all the register values.

program_counter_register: Option<usize>

The register number which is the program counter register.

link_register: Option<usize>

The register number which is the link register.

stack_pointer_register: Option<usize>

The register number which is the stack pointer register.

cfa: Option<u32>

Canonical Frame Address, which is sometimes needed to evaluate variables.

Implementations

Creates a empty Registers struct.

Add a register value to the struct.

Description:

  • register - The register to add a value for.
  • value - The value that will be stored for that registry.

This function will add the value to the self.registers HashMap with register as the hash number.

Retrieve a register value.

Description:

  • register - The register to get the value from.

Will retrieve the register value from the self.registers HashMap.

Sets all the register values to None in the struct.

Temporally stash the current register values.

Description:

The current register values will be stashed allowing for other register values to be used in the evaluation of variables. This is only used when evaluating StackFrames because preserved register values need to be used in the evaluation.

Pop the stashed register values.

Description:

This is used to pop back the stashed registers into self.registers. This function is only called after doing a stack trace because preserved register values is used for evaluating the StackFrames.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.