{"record":{"id":"6099a98418a0aa20","repo":"go-delve/delve","slug":"can-not-continue-execution-of-core-process","errorCode":null,"errorMessage":"can not continue execution of core process","messagePattern":"can not continue execution of core process","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/core/core.go","lineNumber":190,"sourceCode":"\tp      *process\n\tcommon proc.CommonThread\n}\n\ntype osThread interface {\n\tRegisters() (proc.Registers, error)\n\tThreadID() int\n}\n\nvar (\n\t// ErrWriteCore is returned when attempting to write to the core\n\t// process memory.\n\tErrWriteCore = errors.New(\"can not write to core process\")\n\n\t// ErrShortRead is returned on a short read.\n\tErrShortRead = errors.New(\"short read\")\n\n\t// ErrContinueCore is returned when trying to continue execution of a core process.\n\tErrContinueCore = errors.New(\"can not continue execution of core process\")\n\n\t// ErrChangeRegisterCore is returned when trying to change register values for core files.\n\tErrChangeRegisterCore = errors.New(\"can not change register values of core process\")\n)\n\ntype openFn func(string, string) (*process, proc.Thread, error)\n\nvar openFns = []openFn{readLinuxOrPlatformIndependentCore, readAMD64Minidump}\n\n// ErrUnrecognizedFormat is returned when the core file is not recognized as\n// any of the supported formats.\nvar ErrUnrecognizedFormat = errors.New(\"unrecognized core format\")\n\n// OpenCore will open the core file and return a *proc.TargetGroup.\n// If the DWARF information cannot be found in the binary, Delve will look\n// for external debug files in the directories passed in.\nfunc OpenCore(corePath, exePath string, debugInfoDirs []string) (*proc.TargetGroup, error) {\n\tvar p *process","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/core/core.go#L172-L208","documentation":"ErrContinueCore (pkg/proc/core/core.go:190) is returned by Restart, ContinueOnce, and StepInstruction when a program is asked to run while being debugged from a core file. Core dumps are static snapshots: there is no live process to resume or step, so any execution request is rejected with this sentinel.","triggerScenarios":"Calling debugger.Continue(), Step/StepInstruction, or Restart against a target opened with OpenCore; also ClearCheckpoint-adjacent flows like Checkpoint() that funnel through ErrContinueCore.","commonSituations":"Automated tooling that reuses a live-debug workflow (continue until breakpoint) on a core dump; running 'dlv core' and typing continue/step at the prompt; test harnesses parameterized over live and core backends hitting the core case.","solutions":["Do not issue continue/step/restart commands when the target is a core file; check target.Recorded()/backend type first.","Limit core-file sessions to inspection commands (print, frame, stack, breakpoints skipped).","If you need execution, reproduce with a live process: dlv debug/exec/attach instead of dlv core.","For replay semantics, use delve's recorded-trace support (dlv replay) rather than expecting cores to run."],"exampleFix":"// before\ngrp, _ := debugger.AttachFromCore(...) \ndebugger.Continue() // -> can not continue execution of core process\n\n// after\nif recorded, _ := grp.Selected().Process().Recorded(); !isLiveCore(grp) {\n    debugger.Continue()\n} else {\n    // inspect static state only: stack, variables, frames\n}","handlingStrategy":"validation","validationCode":"if isCoreTarget(tg) { return fmt.Errorf(\"cannot continue a core dump; inspect state only\") }\n// isCoreTarget checks the backend, e.g. via tg.Selected().Process().Recorded() and open path","typeGuard":"func isLiveProcess(tg *proc.TargetGroup) bool { t := tg.Selected(); return t != nil && !t.Process().Recorded() || t.Recorded() && t.Recorded() /* use backend info */ }","tryCatchPattern":"err := dbg.Continue()\nif errors.Is(err, core.ErrContinueCore) {\n    log.Println(\"core dump: execution control unsupported; use inspection commands\")\n    return nil\n}","preventionTips":["Check target type before issuing any execution-control command.","Keep live-debug and core-analysis code paths separate.","Use 'dlv replay' when you need stepping over a recorded execution.","Document in tooling that core sessions are read-only."],"tags":["core-dump","execution-control","go","delve"],"backgroundTag":"core-file-not-executable","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}