How to debug go-ipfs by gdb or dlv

#go build -a -gcflags="-N -l" -v ./cmd/ipfs
#[root@home go-ipfs]# gdb ipfs
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7
Copyright © 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “x86_64-redhat-linux-gnu”.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/…
Reading symbols from /root/goproject/src/github.com/ipfs/go-ipfs/ipfs…done.
(gdb) l
1 _cgo_export.c: No such file or directory.
(gdb) q

and use dlv

[root@node175 go-ipfs]# dlv exec ./ipfs swarm peers
could not launch process: could not find .debug_frame section in binary
[root@node175 go-ipfs]# /ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM
/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64
/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd
nessary info:

go version

go version go1.10.1 linux/amd64
[root@node175 go-ipfs]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.1 (Maipo)
[root@node175 go-ipfs]# uname -r
3.10.0-693.21.1.el7.x86_64

who can help me , thanks

Take a look at: https://golang.org/doc/gdb