20
20
//!
21
21
//! These types are defined for the compatibility with the Nightly Rust build.
22
22
23
+ use crate :: registers:: rflags:: RFlags ;
23
24
use crate :: { PrivilegeLevel , VirtAddr } ;
24
25
use bit_field:: BitField ;
25
26
use bitflags:: bitflags;
@@ -938,7 +939,7 @@ pub struct InterruptStackFrameValue {
938
939
pub code_segment : SegmentSelector ,
939
940
_reserved1 : [ u8 ; 6 ] ,
940
941
/// The flags register before the interrupt handler was invoked.
941
- pub cpu_flags : u64 ,
942
+ pub cpu_flags : RFlags ,
942
943
/// The stack pointer at the time of the interrupt.
943
944
pub stack_pointer : VirtAddr ,
944
945
/// The stack segment descriptor at the time of the interrupt (often zero in 64-bit mode).
@@ -948,17 +949,10 @@ pub struct InterruptStackFrameValue {
948
949
949
950
impl fmt:: Debug for InterruptStackFrameValue {
950
951
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
951
- struct Hex ( u64 ) ;
952
- impl fmt:: Debug for Hex {
953
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
954
- write ! ( f, "{:#x}" , self . 0 )
955
- }
956
- }
957
-
958
952
let mut s = f. debug_struct ( "InterruptStackFrame" ) ;
959
953
s. field ( "instruction_pointer" , & self . instruction_pointer ) ;
960
954
s. field ( "code_segment" , & self . code_segment ) ;
961
- s. field ( "cpu_flags" , & Hex ( self . cpu_flags ) ) ;
955
+ s. field ( "cpu_flags" , & self . cpu_flags ) ;
962
956
s. field ( "stack_pointer" , & self . stack_pointer ) ;
963
957
s. field ( "stack_segment" , & self . stack_segment ) ;
964
958
s. finish ( )
0 commit comments