pkg/proc: Fix build errors (#2637)

Fix ebpf build errors on Windows and update bininfo.Location API call.

Fixes #2636
This commit is contained in:
Derek Parker 2021-08-04 01:00:32 -07:00 committed by GitHub
parent 7462767355
commit f95340ae1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

@ -419,7 +419,7 @@ func (t *Target) SetEBPFTracepoint(fnName string) error {
if err != nil {
return err
}
offset, pieces, _, err := t.BinInfo().Location(entry, dwarf.AttrLocation, fn.Entry, op.DwarfRegisters{})
offset, pieces, _, err := t.BinInfo().Location(entry, dwarf.AttrLocation, fn.Entry, op.DwarfRegisters{}, nil)
if err != nil {
return err
}

@ -10,6 +10,7 @@ import (
sys "golang.org/x/sys/windows"
"github.com/go-delve/delve/pkg/proc"
"github.com/go-delve/delve/pkg/proc/internal/ebpf"
)
// osProcessDetails holds Windows specific information.
@ -488,10 +489,15 @@ func (dbp *nativeProcess) EntryPoint() (uint64, error) {
}
func (dbp *nativeProcess) SupportsBPF() bool {
return true
return false
}
func (dbp *nativeProcess) SetUProbe(fnName string, args []proc.UProbeArgMap) {
func (dbp *nativeProcess) SetUProbe(fnName string, args []ebpf.UProbeArgMap) error {
return nil
}
func (dbp *nativeProcess) GetBufferedTracepoints() []ebpf.RawUProbeParams {
return nil
}
func killProcess(pid int) error {