go-delve/delve · error

could not find moduledata

Error message

could not find moduledata

What it means

Error "could not find moduledata" thrown in go-delve/delve.

Source

Thrown at pkg/proc/bininfo.go:1840

	// 	...
	// 	rodata uintptr
	// 	gofunc uintptr
	// 	...
	// }
	// So do some pointer arithmetic to get the value we need.
	gofuncval := binary.LittleEndian.Uint64(moduleData[rodata+(1*ptrsize) : rodata+(2*ptrsize)])
	return gofuncval, nil
}

func parseModuleData(dataSection []byte, tableAddr uint64) ([]byte, error) {
	buf := new(bytes.Buffer)
	err := binary.Write(buf, binary.LittleEndian, &tableAddr)
	if err != nil {
		return nil, err
	}
	off := bytes.Index(dataSection, buf.Bytes()[:4])
	if off == -1 {
		return nil, errors.New("could not find moduledata")
	}
	return dataSection[off : off+0x300], nil
}

// _STT_FUNC is a code object, see /usr/include/elf.h for a full definition.
const _STT_FUNC = 2

func (bi *BinaryInfo) loadSymbolName(image *Image, file *elf.File, wg *sync.WaitGroup) {
	defer wg.Done()
	if bi.SymNames == nil {
		bi.SymNames = make(map[uint64]*elf.Symbol)
	}
	symSecs, _ := file.Symbols()
	for _, symSec := range symSecs {
		if symSec.Info == _STT_FUNC { // TODO(chainhelen), need to parse others types.
			s := symSec
			bi.SymNames[symSec.Value+image.StaticBase] = &s
		}

View on GitHub (pinned to a23773e6c3)

When it happens

Trigger: Thrown at pkg/proc/bininfo.go:1840 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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