Skip to content

Commit

Permalink
pkg/proc: Fix build errors (#2637)
Browse files Browse the repository at this point in the history
Fix ebpf build errors on Windows and update bininfo.Location API call.

Fixes #2636
  • Loading branch information
derekparker committed Aug 4, 2021
1 parent 7462767 commit f95340a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/proc/breakpoints.go
Expand Up @@ -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
}
Expand Down
10 changes: 8 additions & 2 deletions pkg/proc/native/proc_windows.go
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f95340a

Please sign in to comment.