valgrind

package
v0.0.0-...-51c1140 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPort int = 1500

DefaultPort is the default port for valgrind commentary sent to a socket.

Variables

This section is empty.

Functions

func Memcheck

func Memcheck(name string, arg ...string) *exec.Cmd

Types

type AuxInfo

type AuxInfo struct {
	What  string
	Stack []*StackFrame
}

AuxInfo provides additional information regarding the cause of an error. For example, when Valgrind detects a double free the auxillary information will identify where the memory was previously freed.

type ErrorInfo

type ErrorInfo struct {
	Unique string
	Kind   string
	What   string
	Stack  []*StackFrame
	Aux    []*AuxInfo
}

ErrorInfo represents an error detected by Valgrind.

type Listener

type Listener struct {
	*net.TCPListener
}

Listener is a TCP network listener for commentary from valgrind.

func Listen

func Listen(network, addr string) (*Listener, error)

type Report

type Report struct {
	Pid         int
	Ppid        int
	Tool        string
	Errors      []*ErrorInfo
	ErrorCounts map[string]int
}

Report summarizes the output produced by Valgrind.

func ParseXML

func ParseXML(data []byte) (*Report, error)

ParseXML parses XML-formatted Valgrind output.

func (*Report) MarshalText

func (r *Report) MarshalText() ([]byte, error)

type StackFrame

type StackFrame struct {
	IP     string // instruction pointer
	Object string // name of the shared object or executable

	Function string // name of the function or symbol corresponding to IP
	Location string // source location where Function is defined
}

StackFrame represents a stack frame as identified (traced) by Valgrind.

Jump to

Keyboard shortcuts

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