{"record":{"id":"d51b4c66a8cb4169","repo":"go-delve/delve","slug":"you-must-provide-a-core-file-and-an-executable","errorCode":null,"errorMessage":"you must provide a core file and an executable","messagePattern":"you must provide a core file and an executable","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/dlv/cmds/commands.go","lineNumber":388,"sourceCode":"\ttraceCommand.Flags().String(\"output\", \"\", \"Output path for the binary.\")\n\tmust(traceCommand.MarkFlagFilename(\"output\"))\n\ttraceCommand.Flags().IntVarP(&traceFollowCalls, \"follow-calls\", \"\", 0, \"Trace all children of the function to the required depth. Trace also supports defer functions and cases where functions are dynamically returned and passed as parameters.\")\n\ttraceCommand.Flags().IntVarP(&traceVerbose, \"verbose\", \"v\", 0, \"Parameter verbosity: 0=values, 1=types, 2=inline, 3=expanded, 4=full (default 0)\")\n\trootCommand.AddCommand(traceCommand)\n\n\tcoreCommand := &cobra.Command{\n\t\tUse:   \"core <executable> <core>\",\n\t\tShort: \"Examine a core dump.\",\n\t\tLong: `Examine a core dump (only supports linux and windows core dumps).\n\nThe core command will open the specified core file and the associated\nexecutable and let you examine the state of the process when the\ncore dump was taken.\n\nCurrently supports linux/amd64 and linux/arm64 core files, windows/amd64 minidumps and core files generated by Delve's 'dump' command.`,\n\t\tPersistentPreRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\tif len(args) != 2 {\n\t\t\t\treturn errors.New(\"you must provide a core file and an executable\")\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t\tRun: coreCmd,\n\t\tValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {\n\t\t\tif len(args) > 2 {\n\t\t\t\treturn nil, cobra.ShellCompDirectiveNoFileComp\n\t\t\t}\n\t\t\treturn nil, cobra.ShellCompDirectiveDefault\n\t\t},\n\t}\n\t// -c is unused and exists so delve can be used with coredumpctl\n\tcore := false\n\tcoreCommand.Flags().BoolVarP(&core, \"core\", \"c\", false, \"\")\n\tcoreCommand.Flags().MarkHidden(\"core\")\n\trootCommand.AddCommand(coreCommand)\n\n\t// 'version' subcommand.","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/cmd/dlv/cmds/commands.go#L370-L406","documentation":"Error \"you must provide a core file and an executable\" thrown in go-delve/delve.","triggerScenarios":"Thrown at cmd/dlv/cmds/commands.go:388 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}