github.com/undoio/delve@v1.9.0/pkg/proc/internal/ebpf/helpers_disabled.go (about)

     1  //go:build !linux || !amd64 || !go1.16 || !cgo
     2  // +build !linux !amd64 !go1.16 !cgo
     3  
     4  package ebpf
     5  
     6  import (
     7  	"debug/elf"
     8  	"errors"
     9  )
    10  
    11  type EBPFContext struct {
    12  }
    13  
    14  func (ctx *EBPFContext) Close() {
    15  
    16  }
    17  
    18  func (ctx *EBPFContext) AttachUprobe(pid int, name string, offset uint32) error {
    19  	return errors.New("eBPF is disabled")
    20  }
    21  
    22  func (ctx *EBPFContext) AttachURetprobe(pid int, name string, offset uint32) error {
    23  	return errors.New("eBPF is disabled")
    24  }
    25  
    26  func (ctx *EBPFContext) UpdateArgMap(key uint64, goidOffset int64, args []UProbeArgMap, gAddrOffset uint64, isret bool) error {
    27  	return errors.New("eBPF is disabled")
    28  }
    29  
    30  func (ctx *EBPFContext) GetBufferedTracepoints() []RawUProbeParams {
    31  	return nil
    32  }
    33  
    34  func SymbolToOffset(file, symbol string) (uint32, error) {
    35  	return 0, errors.New("eBPF disabled")
    36  }
    37  
    38  func LoadEBPFTracingProgram(path string) (*EBPFContext, error) {
    39  	return nil, errors.New("eBPF disabled")
    40  }
    41  
    42  func AddressToOffset(f *elf.File, addr uint64) (uint32, error) {
    43  	return 0, errors.New("eBPF disabled")
    44  }