debug

package
v2.0.5-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnnotatorFilesData []*AnnotatorFileData // all debug data

Vars populated at init by godebugconfig pkg (generated at compile).

View Source
var LimitReachedErr = fmt.Errorf("limit reached")
View Source
var ServerAddress string
View Source
var ServerNetwork string
View Source
var SyncSend bool // don't send in chunks (usefull to get msgs before crash)

Functions

func DecodeMessage

func DecodeMessage(rd io.Reader) (interface{}, error)

func EncodeMessage

func EncodeMessage(msg interface{}) ([]byte, error)

func ExitServer

func ExitServer()

Auto-inserted at main for a clean exit. Not to be used.

func Line

func Line(fileIndex, debugIndex, offset int, item Item)

Auto-inserted at annotations. Not to be used.

func ReducedSprintf

func ReducedSprintf(max int, format string, a ...interface{}) string

func RegisterStructure

func RegisterStructure(v interface{})

func StartServer

func StartServer()

Called by the generated config.

Types

type AnnotatorFileData

type AnnotatorFileData struct {
	FileIndex int
	DebugLen  int
	Filename  string
	FileSize  int
	FileHash  []byte
}

type CConn

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

Client connection.

func NewCCon

func NewCCon(srv *Server, conn net.Conn) *CConn

func (*CConn) Close

func (cconn *CConn) Close()

func (*CConn) Send

func (cconn *CConn) Send(v *LineMsg)

type Ctx

type Ctx struct {
	Parent *Ctx
	// name/value (short names to avoid usage, still exporting it)
	N string
	V interface{}
}

func (*Ctx) Value

func (ctx *Ctx) Value(name string) (interface{}, *Ctx)

func (*Ctx) ValueBool

func (ctx *Ctx) ValueBool(name string) bool

func (*Ctx) ValueInInterface

func (ctx *Ctx) ValueInInterface(depth int) bool

func (*Ctx) ValueIntM1

func (ctx *Ctx) ValueIntM1(name string) int

func (*Ctx) WithInInterface

func (ctx *Ctx) WithInInterface(depth int) *Ctx

func (*Ctx) WithValue

func (ctx *Ctx) WithValue(name string, value interface{}) *Ctx

type FilesDataMsg

type FilesDataMsg struct {
	Data []*AnnotatorFileData
}

type Item

type Item interface {
}

func IA

func IA(lhs, rhs *ItemList) Item

ItemAssign

func IAn

func IAn() Item

ItemAnon

func IB

func IB(result Item, op int, x, y Item) Item

ItemBinary

func IBr

func IBr() Item

ItemBranch

func IC

func IC(name string, result Item, args ...Item) Item

ItemCall

func ICe

func ICe(name string, args ...Item) Item

ItemCall: enter

func II

func II(result, expr, index Item) Item

ItemIndex

func II2

func II2(result, expr, low, high, max Item, slice3 bool) Item

func IKV

func IKV(key, value Item) Item

ItemKeyValue

func IL2

func IL2(u ...Item) Item

func ILa

func ILa() Item

ItemLabel

func ILit

func ILit(fields ...Item) Item

ItemLiteral

func IP

func IP(x Item) Item

ItemParen

func IS

func IS(ch, value Item) Item

ItemSend

func ISel

func ISel(x, sel Item) Item

ItemSelector

func ISt

func ISt() Item

ItemStep

func ITA

func ITA(x, t Item) Item

ItemTypeAssert

func IU

func IU(result Item, op int, x Item) Item

ItemUnary

func IUe

func IUe(op int, x Item) Item

ItemUnary: enter

func IV

func IV(v V) Item

ItemValue

func IVl

func IVl(v V) Item

ItemValue: len

func IVs

func IVs(s string) Item

ItemValue: raw string

func IVt

func IVt(v V) Item

ItemValue: typeof

type ItemAnon

type ItemAnon struct{}

type ItemAssign

type ItemAssign struct {
	Lhs, Rhs *ItemList
}

type ItemBinary

type ItemBinary struct {
	Result Item
	Op     int
	X, Y   Item
}

type ItemBranch

type ItemBranch struct{}

type ItemCall

type ItemCall struct {
	Name   string
	Args   *ItemList
	Result Item
}

type ItemCallEnter

type ItemCallEnter struct {
	Name string
	Args *ItemList
}

type ItemIndex

type ItemIndex struct {
	Result Item
	Expr   Item
	Index  Item
}

type ItemIndex2

type ItemIndex2 struct {
	Result         Item
	Expr           Item
	Low, High, Max Item
	Slice3         bool // 2 colons present
}

type ItemKeyValue

type ItemKeyValue struct {
	Key   Item
	Value Item
}

type ItemLabel

type ItemLabel struct{}

type ItemList

type ItemList struct {
	List []Item
}

func IL

func IL(u ...Item) *ItemList

ItemList ("," and ";")

type ItemList2

type ItemList2 struct {
	List []Item
}

type ItemLiteral

type ItemLiteral struct {
	Fields *ItemList
}

type ItemParen

type ItemParen struct {
	X Item
}

type ItemSelector

type ItemSelector struct {
	X   Item
	Sel Item
}

type ItemSend

type ItemSend struct {
	Chan, Value Item
}

type ItemStep

type ItemStep struct{}

type ItemTypeAssert

type ItemTypeAssert struct {
	X    Item
	Type Item
}

type ItemUnary

type ItemUnary struct {
	Result Item
	Op     int
	X      Item
}

type ItemUnaryEnter

type ItemUnaryEnter struct {
	Op int
	X  Item
}

type ItemValue

type ItemValue struct {
	Str string
}

type LimitedWriter

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

func NewLimitedWriter

func NewLimitedWriter(size int) *LimitedWriter

func (*LimitedWriter) Bytes

func (w *LimitedWriter) Bytes() []byte

func (*LimitedWriter) Write

func (w *LimitedWriter) Write(p []byte) (n int, err error)

type LineMsg

type LineMsg struct {
	FileIndex  int
	DebugIndex int
	Offset     int
	Item       Item
}

type Print

type Print struct {
	Max int // not a strict max, it helps decide to reduce ouput
	Out []byte
	// contains filtered or unexported fields
}

func NewPrint

func NewPrint(max, maxPtrDepth int) *Print

func (*Print) Do

func (p *Print) Do(v interface{}) []byte

type ReqFilesDataMsg

type ReqFilesDataMsg struct{}

type ReqStartMsg

type ReqStartMsg struct{}

type Server

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

func NewServer

func NewServer() (*Server, error)

func (*Server) Close

func (srv *Server) Close()

func (*Server) Send

func (srv *Server) Send(v *LineMsg)

type V

type V interface{}

Jump to

Keyboard shortcuts

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