go-delve/delve · warning

architectural frame rules are unsupported

Error message

architectural frame rules are unsupported

What it means

During DWARF-based frame unwinding, executeFrameRegRule encounters a CFI rule of class 'architectural' (DWCFA_AARCH64/x86 architectural Augmentation). Delve does not implement architecture-defined augmentation rules, so it cannot compute the register value and errors instead of producing a wrong frame.

Source

Thrown at pkg/proc/stack.go:841

		return it.readRegisterAt(regnum, uint64(cfa+rule.Offset))
	case frame.RuleValOffset:
		return op.DwarfRegisterFromUint64(uint64(cfa + rule.Offset)), nil
	case frame.RuleRegister:
		return it.regs.Reg(rule.Reg), nil
	case frame.RuleExpression:
		v, _, err := op.ExecuteStackProgram(it.regs, rule.Expression, it.bi.Arch.PtrSize(), it.mem.ReadMemory)
		if err != nil {
			return nil, err
		}
		return it.readRegisterAt(regnum, uint64(v))
	case frame.RuleValExpression:
		v, _, err := op.ExecuteStackProgram(it.regs, rule.Expression, it.bi.Arch.PtrSize(), it.mem.ReadMemory)
		if err != nil {
			return nil, err
		}
		return op.DwarfRegisterFromUint64(uint64(v)), nil
	case frame.RuleArchitectural:
		return nil, errors.New("architectural frame rules are unsupported")
	case frame.RuleCFA:
		if it.regs.Reg(rule.Reg) == nil {
			return nil, nil
		}
		return op.DwarfRegisterFromUint64(uint64(int64(it.regs.Uint64Val(rule.Reg)) + rule.Offset)), nil
	case frame.RuleFramePointer:
		curReg := it.regs.Reg(rule.Reg)
		if curReg == nil {
			return nil, nil
		}
		if curReg.Uint64Val <= uint64(cfa) {
			return it.readRegisterAt(regnum, curReg.Uint64Val)
		}
		newReg := *curReg
		return &newReg, nil
	}
}

View on GitHub (pinned to a23773e6c3)

Solutions

  1. Rely on frames whose CFI delve supports (Go-compiled code), or step the frame boundary differently
  2. Report/patch: implement the architectural rule for the target architecture in executeFrameRegRule
  3. Use the frame-pointer-based fallback (debug with compiler flags that emit frame pointers)
  4. Avoid debugging frames from foreign C libraries whose DWARF uses architectural augmentation

Example fix

// before
case frame.RuleArchitectural:
    return nil, errors.New("architectural frame rules are unsupported")
// after
case frame.RuleArchitectural:
    // implement arch-specific default rule, e.g. same as RuleSameVal or defined default
    return op.DwarfRegisterFromUint64(it.regs.Uint64Val(rule.Reg)), nil
Defensive patterns

Strategy: fallback

Validate before calling

// inspect CFI augmentation before unwinding
// (dwarf) check FDE augmentation string for unsupported vendor/architectural augmentation

Try / catch

reg, err := executeFrameRegRule(it, rule)
if err != nil && strings.Contains(err.Error(), "architectural frame rules are unsupported") {
    return fallbackToFramePointerUnwind(it)
}

Prevention

When it happens

Trigger: Unwinding a frame whose DWARF FDE contains a RuleArchitectural register rule — typically when advancing registers through frames (advanceRegsDWARF) on binaries compiled with unusual CFI or architectures whose augmentation delve lacks.

Common situations: Debugging binaries produced by non-Go toolchains (C assemblies, system libraries) with architectural augmentation CFI; cgo frames; platform DWARF variants delve does not support.

Related errors


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