delve: Multiple commands always fail with "Command failed: no such device"

  1. What version of Delve are you using (dlv version)? Delve Debugger Version: 1.0.0-rc.2 Build: $Id: 5c7676404d10d52e16be57fea744a7312b831f0c

  2. What version of Go are you using? (go version)? go version go1.9.2 linux/amd64

  3. What operating system and processor architecture are you using? Debian GNU/Linux 9.2 (stretch) - Intel Xeon E5520 (64 bit)

  4. What did you do? Ran dlv debug hello.go (dlv) b hello.go:8 Breakpoint 1 set at 0x49eecd for main.main() ./hello.go:8 (dlv) c

> main.main() ./hello.go:8 (hits goroutine(1):1 total:1) (PC: 0x49eecd)
     3: import "fmt"
     4:
     5: func main() {
     6:         var s []byte
     7:         s = append(s, []byte("Hello, Debugging!")...)
=>   8:         fmt.Println(string(s))
     9: }

(dlv) n

n
     3: import "fmt"
     4:
     5: func main() {
     6:         var s []byte
     7:         s = append(s, []byte("Hello, Debugging!")...)
=>   8:         fmt.Println(string(s))
     9: }
  1. What did you expect to see? After pressing โ€˜nโ€™ I would expect the debugger should go ahead and print the value of the string.

  2. What did you see instead? Command failed: no such device

Also, the same error message is reported whenever I use the print command on a variable or a data structure.

I donโ€™t understand from where this error comes up. What possibly prevents the debugger to execute such a simple program? Other commands from the debugger works as expected (e.g. goroutines,threads,funcs,etc.).

I have also checked if the Yama security module is involved but I believe the setting is ok:

~$ cat /proc/sys/kernel/yama/ptrace_scope
0

The source of the Go program is extremely simple:

package main

import "fmt"

func main() {
        var s []byte
        s = append(s, []byte("Hello, Debugging!")...)
        fmt.Println(string(s))
}

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks a lot @aarzilli !! It worked perfectly on my local Debian Stretch installation! ๐Ÿ˜ƒ

cd $GOPATH/src/github.com/derekparker/delve
git checkout -b aarzilli-fix1022 master
git pull https://github.com/aarzilli/delve.git fix1022
make install