@@ -16,7 +16,7 @@ use std::mem::MaybeUninit;
16
16
use std:: ptr;
17
17
use std:: ptr:: NonNull ;
18
18
19
- /// The decoder will work on the buffer defined in a Config , it shall contain
19
+ /// The decoder will work on the buffer defined in the builder , it shall contain
20
20
/// raw trace data and remain valid for the lifetime of the decoder.
21
21
///
22
22
/// The decoder needs to be synchronized before it can be used.
@@ -28,9 +28,9 @@ pub struct BlockDecoder<'a> {
28
28
}
29
29
30
30
impl PtEncoderDecoder for BlockDecoder < ' _ > {
31
- /// Allocate an Intel PT block decoder.
31
+ /// Create an Intel PT block decoder.
32
32
///
33
- /// The decoder will work on the buffer defined in @config ,
33
+ /// The decoder will work on the buffer defined in @builder ,
34
34
/// it shall contain raw trace data and remain valid for the lifetime of the decoder.
35
35
/// The decoder needs to be synchronized before it can be used.
36
36
fn new_from_builder ( builder : & EncoderDecoderBuilder < Self > ) -> Result < Self , PtError > {
@@ -51,8 +51,7 @@ impl PtEncoderDecoder for BlockDecoder<'_> {
51
51
impl BlockDecoder < ' _ > {
52
52
/// Return the current address space identifier.
53
53
///
54
- /// On success, provides the current address space identifier in @asid.
55
- /// Returns Asid on success, a `PtError` otherwise.
54
+ /// On success, provides the current address space identifier a `PtError` otherwise.
56
55
pub fn asid ( & self ) -> Result < Asid , PtError > {
57
56
let mut asid = MaybeUninit :: < pt_asid > :: uninit ( ) ;
58
57
ensure_ptok ( unsafe {
@@ -76,7 +75,7 @@ impl BlockDecoder<'_> {
76
75
77
76
/// Get the next pending event.
78
77
///
79
- /// On success, provides the next event, a `StatusFlag ` instance and updates the decoder.
78
+ /// On success, provides the next event, a `Status ` instance and updates the decoder.
80
79
/// Returns `BadQuery` if there is no event.
81
80
pub fn event ( & mut self ) -> Result < ( Event , Status ) , PtError > {
82
81
let mut evt = MaybeUninit :: < pt_event > :: uninit ( ) ;
@@ -135,16 +134,16 @@ impl BlockDecoder<'_> {
135
134
/// Determine the next block of instructions.
136
135
///
137
136
/// On success, provides the next block of instructions in execution order.
138
- /// Also Returns a `StatusFlag ` instance on success.
137
+ /// Also Returns a `Status ` instance on success.
139
138
/// Returns Eos to indicate the end of the trace stream.
140
- /// Subsequent calls to next will continue to return Eos until trace is required to determine the next instruction.
139
+ /// Subsequent calls will continue to return Eos until trace is required to determine the next instruction.
141
140
/// Returns `BadContext` if the decoder encountered an unexpected packet.
142
141
/// Returns `BadOpc` if the decoder encountered unknown packets.
143
142
/// Returns `BadPacket` if the decoder encountered unknown packet payloads.
144
143
/// Returns `BadQuery` if the decoder got out of sync.
145
- /// Returns Eos if decoding reached the end of the Intel PT buffer.
146
- /// Returns Nomap if the memory at the instruction address can't be read.
147
- /// Returns Nosync if the decoder is out of sync.
144
+ /// Returns ` Eos` if decoding reached the end of the Intel PT buffer.
145
+ /// Returns ` Nomap` if the memory at the instruction address can't be read.
146
+ /// Returns ` Nosync` if the decoder is out of sync.
148
147
pub fn decode_next ( & mut self ) -> Result < ( Block , Status ) , PtError > {
149
148
let mut blk = MaybeUninit :: < pt_block > :: uninit ( ) ;
150
149
let status = extract_status_or_pterr ( unsafe {
0 commit comments