go-delve/delve · error
entry point not found
Error message
entry point not found
What it means
On FreeBSD, EntryPoint() scans the ELF auxiliary vector (auxv) returned by procstat_getauxv looking for the AT_ENTRY tag, which holds the program entry point address. This error means the auxv was read but no AT_ENTRY entry was present. Delve needs this address to support entry-point-based operations, so it fails hard.
Source
Thrown at pkg/proc/native/proc_freebsd.go:612
}
defer C.procstat_freeprocs(ps, kipp)
if count == 0 {
return 0, errors.New("procstat_getprocs returned no processes")
}
auxv, err := C.procstat_getauxv(ps, kipp, &count)
if err != nil {
return 0, fmt.Errorf("procstat_getauxv failed: %v", err)
}
defer C.procstat_freeauxv(ps, auxv)
for i := 0; i < int(count); i++ {
if auxv.a_type == C.AT_ENTRY {
return uint64(C.elf_aux_info_ptr(auxv)), nil
}
auxv = (*C.Elf_Auxinfo)(unsafe.Pointer(uintptr(unsafe.Pointer(auxv)) + unsafe.Sizeof(*auxv)))
}
return 0, errors.New("entry point not found")
}
func (dbp *nativeProcess) SupportsBPF() bool {
return false
}
func (dbp *nativeProcess) SetUProbe(fnName string, goidOffset int64, args []ebpf.UProbeArgMap) error {
panic("not implemented")
}
func (dbp *nativeProcess) GetBufferedTracepoints() []ebpf.RawUProbeParams {
panic("not implemented")
}
func (dbp *nativeProcess) ptraceCont(sig int) error {
var err error
dbp.execPtraceFunc(func() { err = ptraceCont(dbp.pid, sig) })
return errView on GitHub (pinned to a23773e6c3)
Solutions
- Check FreeBSD version and update the system; newer releases expose fuller auxv via procstat.
- Inspect the process auxv manually (`procstat -e <pid>`) to confirm AT_ENTRY is present.
- If entry point can't be obtained, derive it from the ELF binary header instead (parse the e_entry of the executable).
- Update delve; alternate entry-point discovery may exist in newer versions.
Example fix
// before
return 0, errors.New("entry point not found")
// after
// fallback: read entry point from the ELF file header
f, err := elf.Open(dbp.bi.BinaryPath())
if err != nil {
return 0, err
}
defer f.Close()
return f.Entry, nil Defensive patterns
Strategy: fallback
Validate before calling
// inspect auxv for AT_ENTRY before relying on EntryPoint()
out, err := exec.Command("procstat", "-e", strconv.Itoa(pid)).Output()
if err != nil || !bytes.Contains(out, []byte("AT_ENTRY")) {
// auxv lacks AT_ENTRY; use ELF header fallback
} Type guard
func isEntryPointNotFound(err error) bool {
return err != nil && err.Error() == "entry point not found"
} Try / catch
ep, err := proc.EntryPoint()
if err != nil && err.Error() == "entry point not found" {
// fallback: read from ELF
f, _ := elf.Open(binaryPath)
ep = f.Entry
} Prevention
- Prefer computing the entry point from the ELF header as a portable fallback.
- Verify the debuggee is a native FreeBSD ELF binary (not emulated).
- Check `procstat -e <pid>` shows AT_ENTRY before entry-point-dependent features.
- Keep FreeBSD and delve versions current.
When it happens
Trigger: EntryPoint() on FreeBSD iterating the entire auxv array of the target process without ever seeing a_type == AT_ENTRY, which happens when the kernel/libprocstat does not supply AT_ENTRY (e.g. unusual exec path, vmm/linux binary emulation, or stripped auxv).
Common situations: Debugging non-native binaries under emulation layers that produce incomplete auxv; old FreeBSD versions where procstat_getauxv omits some tags; debuggee executed via wrappers that alter auxv.
Related errors
- procstat_getprocs returned no processes
- procstat_getauxv failed: %v
- ErrCouldNotDetermineRelocation
- ErrNoDebugInfoFound
- unsupported operating system
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/63326c105b386611.
Report an issue: GitHub.