> > +fn read_type(mut fobj: &File) -> Result
> > +{
> > +let mut tbuf = [0u8; 8];
> > +if let Err(e) = fobj.read_exact(&mut tbuf) {
> > +if e.kind() == ErrorKind::UnexpectedEof {
> > +return Ok(RecordType::Empty);
> > +} else {
> > +
On Mon, May 27, 2024 at 04:14:18PM +0800, Zhao Liu wrote:
> Refer to scripts/simpletrace.py, add the helpers to read the trace file
> and parse the record type field, record header and log header.
>
> Suggested-by: Paolo Bonzini
> Signed-off-by: Zhao Liu
> ---
> scripts/simpletrace-rust/src/mai
Refer to scripts/simpletrace.py, add the helpers to read the trace file
and parse the record type field, record header and log header.
Suggested-by: Paolo Bonzini
Signed-off-by: Zhao Liu
---
scripts/simpletrace-rust/src/main.rs | 151 +++
1 file changed, 151 insertions(+