delve: Multiple commands always fail with "Command failed: no such device"
-
What version of Delve are you using (
dlv version
)? Delve Debugger Version: 1.0.0-rc.2 Build: $Id: 5c7676404d10d52e16be57fea744a7312b831f0c -
What version of Go are you using? (
go version
)? go version go1.9.2 linux/amd64 -
What operating system and processor architecture are you using? Debian GNU/Linux 9.2 (stretch) - Intel Xeon E5520 (64 bit)
-
What did you do? Ran
dlv debug hello.go
(dlv) b hello.go:8Breakpoint 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: }
-
What did you expect to see? After pressing โnโ I would expect the debugger should go ahead and print the value of the string.
-
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)
Thanks a lot @aarzilli !! It worked perfectly on my local Debian Stretch installation! ๐