{"record":{"id":"96623005293f1a28","repo":"go-delve/delve","slug":"convert-address-into-uintptr-type-failed-s-966230","errorCode":null,"errorMessage":"convert address into uintptr type failed, %s","messagePattern":"convert address into uintptr type failed, (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"service/dap/command.go","lineNumber":192,"sourceCode":"\t\tswitch val.Kind {\n\t\tcase reflect.Pointer: // \"-x &myVar\" or \"-x myPtrVar\"\n\t\t\tif len(val.Children) < 1 {\n\t\t\t\treturn fmt.Errorf(\"bug? invalid pointer: %#v\", val).Error(), nil\n\t\t\t}\n\t\t\taddress = val.Children[0].Addr\n\n\t\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: // \"-x 0xc000079f20 + 8\" or -x 824634220320 + 8\n\t\t\tn, _ := constant.Int64Val(val.Value)\n\t\t\taddress = uint64(n)\n\t\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: // \"-x 0xc000079f20 + 8\" or -x 824634220320 + 8\n\t\t\taddress, _ = constant.Uint64Val(val.Value)\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unsupported expression type: %s\", val.Kind).Error(), nil\n\t\t}\n\t} else {\n\t\taddress, err = strconv.ParseUint(args.Operand, 0, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"convert address into uintptr type failed, %s\", err).Error(), nil\n\t\t}\n\t}\n\n\tmemory, err := s.debugger.ExamineMemory(\n\t\taddress,\n\t\tmin(int(args.Count*args.Size), rpc2.ExamineMemoryLengthLimit),\n\t)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"examine memory error: %w\", err).Error(), nil\n\t}\n\n\treturn api.PrettyExamineMemory(uintptr(address), memory, true, args.Format, int(args.Size)), nil\n}\n\nfunc (s *Session) evaluateConfig(_, _ int, expr string) (string, error) {\n\targv := config.Split2PartsBySpace(expr)\n\tname := argv[0]\n\tif name == \"-list\" {","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/service/dap/command.go#L174-L210","documentation":"In DAP's examineMemory REPL command, when the operand is not an expression (no -x flag), Delve parses it with strconv.ParseUint. If the raw operand string is not a valid base-prefixed number (hex 0x, octal 0, decimal), parsing fails and this error is returned. It means the address argument supplied to the 'examine memory' command is not a valid numeric literal.","triggerScenarios":"Calling the DAP evaluate command with 'examine-memory <addr>' where <addr> contains typos, '0x' prefix typos, decimal commas, trailing whitespace/newlines, variable names without '-x', or a value exceeding uint64 range.","commonSituations":"Copy-pasting an address from a tool that formats it differently (e.g. '0xC000... ' with spaces or commas like 0xc000,079f20); passing a symbol name like &myVar without the -x expression flag; a frontend sending a stringified address with scientific notation.","solutions":["Verify the operand is a plain numeric literal with a valid Go prefix (0x hex, 0o/0 octal, decimal) and no whitespace, commas, or decorations.","If you meant to pass a variable or pointer expression, use the -x flag: 'examine-memory -x &myVar' or 'examine-memory -x myPtr'.","If the address came from an expression result, use '-x <expr>' so Delve evaluates it via EvalVariableInScope instead of strconv.","Check the value fits in 64 bits; addresses above 2^64 will fail ParseUint."],"exampleFix":"// before\nexamine-memory 0xc000,079f20\n// after\nexamine-memory 0xc000079f20\n// or, for expressions:\nexamine-memory -x &buf","handlingStrategy":"validation","validationCode":"addr := strings.TrimSpace(operand)\nif _, err := strconv.ParseUint(addr, 0, 64); err != nil {\n    // reject before calling: not a valid address literal\n}\n// hint: Go's ParseUint with base 0 expects 0x/0o/0b prefixes or decimal","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always use the -x flag for expressions or symbol names","Copy addresses without commas or thousands separators","Trim whitespace from operands before sending the command"],"tags":["dap","memory-inspection","argument-parsing"],"backgroundTag":"invalid-address-format","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}