tracelog

package
v0.0.0-...-0b552ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToDir

func ConvertToDir(inputDirection string) bool

ConvertToDir - Convert InputDirection into Bool

func ConvertToType

func ConvertToType(inputType string) int

ConvertToType - Convert a string into a Type

Types

type LineType

type LineType int

LineType - The possible values of the ASCII string received from DUT

const (
	// MEM32 - 32bit memory access
	MEM32 LineType = iota
	// IO - IO port access
	IO
	// MSR - machine specific access
	MSR
	// CPUID - Read CPUID instruction
	CPUID
	// PCI - PCI register access
	PCI
)

type TraceLog

type TraceLog struct {
	// contains filtered or unexported fields
}

TraceLog - Structure were we hold the general TraceLog Informations

func CreateTraceLog

func CreateTraceLog(devTTYDevicePath string, baudTTYDevice int, fifoDevicePath string, cfg config.Config) (*TraceLog, error)

CreateTraceLog - Create a new Trace Log

func (*TraceLog) CollectNewTracelog

func (tl *TraceLog) CollectNewTracelog(config []byte) ([]TraceLogEntry, error)

CollectNewTracelog - Collects a new Trace Log

func (*TraceLog) SetVerbose

func (tl *TraceLog) SetVerbose(v bool)

SetVerbose - Set verbosity of tracing

type TraceLogEntry

type TraceLogEntry struct {
	// Instruction pointer
	IP uint
	// Use one of LineType
	Type int
	// True: In, False: Out
	Inout bool
	// The address that was accessed
	Address uint
	// The value read/written
	Value uint64
	// 8, 16, 32, 64 bit
	AccessSize uint
}

TraceLogEntry - Parse line into Line struct

func ParseLine

func ParseLine(line string) (*TraceLogEntry, error)

ParseLine - Parse a new Line

func (*TraceLogEntry) SmallString

func (tle *TraceLogEntry) SmallString() string

SmallString - Convert TraceLogEntry into a Readable String

func (*TraceLogEntry) String

func (tle *TraceLogEntry) String() string

String - Convert TraceLogEntry into a Readable String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL