mirror of
				https://github.com/go-delve/delve.git
				synced 2025-10-30 10:17:03 +08:00 
			
		
		
		
	 5c5fca4849
			
		
	
	5c5fca4849
	
	
	
		
			
			This patch removes the old error-prone way of tracking whether the tracepoint is for a function entry or return. Instead of trying to guess, let the data structure simply tell us directly.
		
			
				
	
	
		
			36 lines
		
	
	
		
			814 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			814 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package ebpf
 | |
| 
 | |
| import (
 | |
| 	"reflect"
 | |
| 
 | |
| 	"github.com/go-delve/delve/pkg/dwarf/godwarf"
 | |
| 	"github.com/go-delve/delve/pkg/dwarf/op"
 | |
| )
 | |
| 
 | |
| type UProbeArgMap struct {
 | |
| 	Offset int64        // Offset from the stackpointer.
 | |
| 	Size   int64        // Size in bytes.
 | |
| 	Kind   reflect.Kind // Kind of variable.
 | |
| 	Pieces []int        // Pieces of the variables as stored in registers.
 | |
| 	InReg  bool         // True if this param is contained in a register.
 | |
| 	Ret    bool         // True if this param is a return value.
 | |
| }
 | |
| 
 | |
| type RawUProbeParam struct {
 | |
| 	Pieces   []op.Piece
 | |
| 	RealType godwarf.Type
 | |
| 	Kind     reflect.Kind
 | |
| 	Len      int64
 | |
| 	Base     uint64
 | |
| 	Addr     uint64
 | |
| 	Data     []byte
 | |
| }
 | |
| 
 | |
| type RawUProbeParams struct {
 | |
| 	FnAddr       int
 | |
| 	GoroutineID  int
 | |
| 	IsRet        bool
 | |
| 	InputParams  []*RawUProbeParam
 | |
| 	ReturnParams []*RawUProbeParam
 | |
| }
 |