ebpf

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package ebpf provides utilities for fixed crash of uretprobes in Go programs. see the issues: - https://github.com/iovisor/bcc/issues/3034 - https://github.com/golang/go/issues/22008 - https://github.com/iovisor/bcc/issues/1320

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachUretprobe

func AttachUretprobe(attachSymbol string, prog *ebpf.Program, ex *link.Executable, opts *link.UprobeOptions) (link.Link, error)

AttachUretprobe attaches a uretprobe to the function at attachPath and attachSymbol. The probe will be attached to all return instructions in the function.

attachPath is the path to the ELF file containing the function. attachSymbol is the name of the function to attach the probe to. prog is the eBPF program to attach. ex is the executable to attach the probe to. opts are the options for the probe.

Types

type Function

type Function struct {
	Offset  uint64
	Size    uint64
	Prog    *elf.Prog
	Returns []uint64
}

Function represents a function in an ELF file.

Jump to

Keyboard shortcuts

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