guapilsh

Arm 32bit Goland 远程调试

32位支持issue
Goland配置Go remote支持文档
https://mojotv.cn/go/golang-remote_debug

Delve

官方版本delve并不支持arm-32位,直接安装会提示架构不符合

在issue下找到该仓库,实装后可以正常运行,
https://github.com/puppywang/delve

下载后进行安装make install

启动

  1. Goland远程启动程序A
## goland 终端打印
GOROOT= #gosetup
GOPATH=/root/go #gosetup
/root/Env/go/bin/go build -i -o /root/**/executables-7agJx2Zna4/___11_linux demo/cmd/demo #gosetup
go: -i flag is deprecated
/root/****/executables-nq690aaBJS/___11_linux


## 查下进程id,后面用
ps axu|grep ___11_linux

获得`exe_PID`
  1. 远程终端启动dlv
#PID 为程序A进程
dlv --listen=:5604 --headless=true --api-version=2 --check-go-version=false attach 获得`exe_PID`

//TODO 补充命令参数作用
  1. Goland配置Go remote

Host 远程部署IP
port 5604(上面)

然后即可进行远程调试

相关文章:

  • 2021-10-09
  • 2021-04-06
  • 2021-12-02
  • 2021-07-03
  • 2022-01-03
  • 2021-08-20
猜你喜欢
  • 2021-09-03
  • 2021-10-18
  • 2021-05-05
  • 2022-12-23
  • 2021-09-17
  • 2021-07-18
相关资源
相似解决方案