{"record":{"id":"05781b5c89c29dae","repo":"go-delve/delve","slug":"hardware-breakpoints-not-supported","errorCode":null,"errorMessage":"hardware breakpoints not supported","messagePattern":"hardware breakpoints not supported","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/proc/native/hwbreak_other.go","lineNumber":12,"sourceCode":"//go:build (linux && 386) || (darwin && arm64) || (windows && arm64) || (linux && ppc64le) || (linux && riscv64) || (linux && loong64)\n\npackage native\n\nimport (\n\t\"errors\"\n\n\t\"github.com/go-delve/delve/pkg/proc\"\n)\n\nfunc (t *nativeThread) findHardwareBreakpoint() (*proc.Breakpoint, error) {\n\treturn nil, errors.New(\"hardware breakpoints not supported\")\n}\n\nfunc (t *nativeThread) writeHardwareBreakpoint(addr uint64, wtype proc.WatchType, idx uint8) error {\n\treturn errors.New(\"hardware breakpoints not supported\")\n}\n\nfunc (t *nativeThread) clearHardwareBreakpoint(addr uint64, wtype proc.WatchType, idx uint8) error {\n\treturn errors.New(\"hardware breakpoints not supported\")\n}\n","sourceCodeStart":1,"sourceCodeEnd":22,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/native/hwbreak_other.go#L1-L22","documentation":"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.","triggerScenarios":"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.","commonSituations":"User sets a watchpoint (dlv watch) on FreeBSD/NetBSD or an arch without debug-register support; breakpoint hit handling on those platforms consults findHardwareBreakpoint.","solutions":["Avoid watchpoints/hardware breakpoints on this platform; use software breakpoints instead","Check the build: support exists in hwbreak_amd64.go for supported linux OSes — build for a supported OS/arch","If you need HW breakpoints, port the amd64 debug-register implementation (via amd64util.DebugRegisters) to your platform","Handle the error gracefully and fall back to software breakpoints in tooling built on delve"],"exampleFix":"// before\nbp, err := thread.findHardwareBreakpoint()\n// after\nbp, err := thread.findHardwareBreakpoint()\nif err != nil && err.Error() == \"hardware breakpoints not supported\" {\n    bp = nil // fall back to software breakpoint lookup\n    err = nil\n}","handlingStrategy":"fallback","validationCode":"// only use hardware breakpoints/watchpoints where supported\nvar hwBreakpointsSupported = runtime.GOOS == \"linux\" && runtime.GOARCH == \"amd64\"\nif !hwBreakpointsSupported {\n    return errors.New(\"hardware breakpoints unsupported on this platform; use software breakpoints\")\n}","typeGuard":null,"tryCatchPattern":"bp, err := thread.findHardwareBreakpoint()\nif err != nil {\n    if strings.Contains(err.Error(), \"hardware breakpoints not supported\") {\n        bp, err = nil, nil // no HW bp possible; continue with software bp resolution\n    }\n    if err != nil {\n        return err\n    }\n}","preventionTips":["Prefer software breakpoints unless watchpoints (data watches) are required","Only issue watch commands on linux/amd64 builds","Map unsupported-platform errors to a clean fallback in debugger tooling","Consult delve docs on watchpoint platform availability"],"tags":["hardware-breakpoints","watchpoints","platform-unsupported"],"backgroundTag":"hardware-breakpoints-unsupported","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}