mirror of
				https://github.com/go-delve/delve.git
				synced 2025-10-31 18:57:18 +08:00 
			
		
		
		
	 5452c30fac
			
		
	
	5452c30fac
	
	
	
		
			
			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
		
			
				
	
	
		
			14 lines
		
	
	
		
			433 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			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
 |