delve/pkg/proc/internal/ebpf/testhelper/testhelper.go
Alessandro Arzilli 5452c30fac
proc/internal/ebpf: drop dependency on cgo (#3072)
The ebpf implementations uses cgo, but only to access some C struct
definitions. Instead of using cgo simply duplicate the defintion of
those two structs in Go and add a test to check that the duplicate
definitions remain synchronized.

Fixes #2827
2022-07-22 19:39:18 +02:00

14 lines
433 B
Go

//go:build linux && amd64 && cgo && go1.16
// +build linux,amd64,cgo,go1.16
package testhelper
// #include "../bpf/include/function_vals.bpf.h"
import "C"
// Function_parameter_t exports function_parameter_t from function_vals.bpf.h
type Function_parameter_t C.function_parameter_t
// Function_parameter_list_t exports function_parameter_list_t from function_vals.bpf.h
type Function_parameter_list_t C.function_parameter_list_t