Struct Dr7

Source
pub struct Dr7(pub usize);

Tuple Fields§

§0: usize

Implementations§

Source§

impl Dr7

Source

pub const EMPTY: usize = 1_024usize

Empty Dr7 has bit 10 always set.

Source

pub const GD_BIT: usize = 13usize

Bit that controls debug-register protection.

Source

pub const RTM_BIT: usize = 11usize

Bit that controls debugging of RTM transactional regions.

Source

pub const GE_BIT: usize = 9usize

Bit that controls global exact breakpoints.

Source

pub const LE_BIT: usize = 8usize

Bit that controls local exact breakpoints.

Source

pub fn configure_bp( &mut self, bp: Breakpoint, bc: BreakCondition, bs: BreakSize, )

Configures a breakpoint condition bc and size bs for the associated breakpoint bp.

§Note

This should be called before enable_bp.

Source

pub fn enable_bp(&mut self, bp: Breakpoint, global: bool)

Enables the breakpoint condition for the associated breakpoint.

§Arguments
  • bp - The breakpoint to enable.
  • global - If true, the breakpoint is global (e.g., never reset on task switches). If false, the CPU resets the flag (disables bp) on task switch.
Source

pub fn disable_bp(&mut self, bp: Breakpoint, global: bool)

Disables the breakpoint condition for the associated breakpoint.

  • bp: The breakpoint to disable.
  • global: If true, the global breakpoint bit is unset (e.g., never reset on task switches). If false, the local breakpoint bit is unset.
Source

pub fn enable_exact_local_bp(&mut self)

Local exact breakpoint enable.

This flag causes the processor to detect the exact instruction that caused a data breakpoint condition. This feature is not supported in the P6 family processors, later IA-32 processors, and Intel 64 processors.

For backward and forward compatibility with other Intel processors, Intel recommends that the LE flag be set to 1 if exact breakpoints are required.

Source

pub fn enable_exact_global_bp(&mut self)

Global exact breakpoint enable.

This flag causes the processor to detect the exact instruction that caused a data breakpoint condition. This feature is not supported in the P6 family processors, later IA-32 processors, and Intel 64 processors.

For backward and forward compatibility with other Intel processors, Intel recommends that the GE flag be set to 1 if exact breakpoints are required.

Source

pub fn enable_rtm(&mut self)

Enables advanced debugging of RTM transactional regions.

§Note

This advanced debugging is enabled only if IA32_DEBUGCTL.RTM is also set.

Source

pub fn enable_general_detect(&mut self)

Enables debug-register protection, which causes a debug exception to be generated prior to any MOV instruction that accesses a debug register.

Trait Implementations§

Source§

impl Clone for Dr7

Source§

fn clone(&self) -> Dr7

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Dr7

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Dr7

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Dr7

Source§

fn eq(&self, other: &Dr7) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Dr7

Source§

impl Eq for Dr7

Source§

impl StructuralPartialEq for Dr7

Auto Trait Implementations§

§

impl Freeze for Dr7

§

impl RefUnwindSafe for Dr7

§

impl Send for Dr7

§

impl Sync for Dr7

§

impl Unpin for Dr7

§

impl UnwindSafe for Dr7

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.