package breakpoints

import "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/breakpoints"

Package breakpoints handles breakpoint requests we get from the user through the Debuglet Controller, and manages corresponding breakpoints set in the code.

Index

Types

type BreakpointStore

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

BreakpointStore stores the set of breakpoints for a program.

func NewBreakpointStore

func NewBreakpointStore(prog debug.Program) *BreakpointStore

NewBreakpointStore returns a BreakpointStore for the given program.

func (*BreakpointStore) BreakpointsAtPC

func (bs *BreakpointStore) BreakpointsAtPC(pc uint64) []*cd.Breakpoint

BreakpointsAtPC returns all the breakpoints for which we set a code breakpoint at the given address.

func (*BreakpointStore) ErrorBreakpoints

func (bs *BreakpointStore) ErrorBreakpoints() []*cd.Breakpoint

ErrorBreakpoints returns a slice of Breakpoints that caused errors when the BreakpointStore tried to process them, and resets the list of such breakpoints. The caller is expected to send updates to the server to indicate the errors.

func (*BreakpointStore) ProcessBreakpointList

func (bs *BreakpointStore) ProcessBreakpointList(bps []*cd.Breakpoint)

ProcessBreakpointList applies updates received from the Debuglet Controller through a List call.

func (*BreakpointStore) RemoveBreakpoint

func (bs *BreakpointStore) RemoveBreakpoint(bp *cd.Breakpoint)

RemoveBreakpoint makes the given breakpoint inactive. This is called when either the debugged program hits the breakpoint, or the Debuglet Controller informs us that the breakpoint is now inactive.

Source Files

breakpoints.go

Version
v0.101.0
Published
Apr 20, 2022
Platform
linux/amd64
Imports
4 packages
Last checked
33 minutes ago

Tools for package owners.