go-delve/delve · warning

hardware breakpoints not supported

Error message

hardware breakpoints not supported

What it means

The platform's native backend was compiled with hwbreak_other.go, which provides no hardware breakpoint/watchpoint support. findHardwareBreakpoint unconditionally returns this error instead of a matching breakpoint.

Source

Thrown at pkg/proc/native/hwbreak_other.go:12

//go:build (linux && 386) || (darwin && arm64) || (windows && arm64) || (linux && ppc64le) || (linux && riscv64) || (linux && loong64)

package native

import (
	"errors"

	"github.com/go-delve/delve/pkg/proc"
)

func (t *nativeThread) findHardwareBreakpoint() (*proc.Breakpoint, error) {
	return nil, errors.New("hardware breakpoints not supported")
}

func (t *nativeThread) writeHardwareBreakpoint(addr uint64, wtype proc.WatchType, idx uint8) error {
	return errors.New("hardware breakpoints not supported")
}

func (t *nativeThread) clearHardwareBreakpoint(addr uint64, wtype proc.WatchType, idx uint8) error {
	return errors.New("hardware breakpoints not supported")
}

View on GitHub (pinned to a23773e6c3)

Solutions

  1. Avoid watchpoints/hardware breakpoints on this platform; use software breakpoints instead
  2. Check the build: support exists in hwbreak_amd64.go for supported linux OSes — build for a supported OS/arch
  3. If you need HW breakpoints, port the amd64 debug-register implementation (via amd64util.DebugRegisters) to your platform
  4. Handle the error gracefully and fall back to software breakpoints in tooling built on delve

Example fix

// before
bp, err := thread.findHardwareBreakpoint()
// after
bp, err := thread.findHardwareBreakpoint()
if err != nil && err.Error() == "hardware breakpoints not supported" {
    bp = nil // fall back to software breakpoint lookup
    err = nil
}
Defensive patterns

Strategy: fallback

Validate before calling

// only use hardware breakpoints/watchpoints where supported
var hwBreakpointsSupported = runtime.GOOS == "linux" && runtime.GOARCH == "amd64"
if !hwBreakpointsSupported {
    return errors.New("hardware breakpoints unsupported on this platform; use software breakpoints")
}

Try / catch

bp, err := thread.findHardwareBreakpoint()
if err != nil {
    if strings.Contains(err.Error(), "hardware breakpoints not supported") {
        bp, err = nil, nil // no HW bp possible; continue with software bp resolution
    }
    if err != nil {
        return err
    }
}

Prevention

When it happens

Trigger: Any code path that asks a nativeThread to resolve a hardware breakpoint, e.g. when a thread traps and Delve checks whether the stop was caused by a hardware watchpoint on unsupported OS/arch combos.

Common situations: User sets a watchpoint (dlv watch) on FreeBSD/NetBSD or an arch without debug-register support; breakpoint hit handling on those platforms consults findHardwareBreakpoint.

Related errors


AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31). Data as JSON: /api/errors/05781b5c89c29dae. Report an issue: GitHub.