douzhang7603 2019-01-23 18:45
浏览 294

无法调试Go代码:无法启动进程:在偏移量0x0处解码矮节信息:太短

we are trying to debug Go code and getting this error:

could not launch process: decoding dwarf section info at offset 0x0: too short

our settings:

WITSC02X6385JGH:orderer sjain68$ uname -a
Darwin WITSC02X6385JGH 17.7.0 Darwin Kernel Version 17.7.0: Fri Jul  6 19:54:51 PDT 2018; root:xnu-4570.71.3~2/RELEASE_X86_64 x86_64
WITSC02X6385JGH:orderer sjain68$ go version
go version go1.11 darwin/amd64
WITSC02X6385JGH:orderer sjain68$ dlv version
Delve Debugger
Version: 1.1.0
Build: $Id: 1990ba12450cab9425a2ae62e6ab988725023d5c

Things we have tried:

  • Update dlv using VS Code -> Go: Install/Update Tools

Try running from command line:

WITSC02X6385JGH:orderer sjain68$ /Users/sjain68/go/bin/dlv debug github.com/hyperledger/fabric/orderer --headless=true --listen=127.0.0.1:41305 --api-version=2 --log=true --
API server listening at: 127.0.0.1:41305
INFO[0002] launching process with args: [/Users/sjain68/go/src/github.com/hyperledger/fabric/orderer/debug]  layer=debugger
debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-902.0.79.7
 for x86_64.
Got a connection, launched process /Users/sjain68/go/src/github.com/hyperledger/fabric/orderer/debug (pid = 9278).
Exiting.
could not launch process: decoding dwarf section info at offset 0x0: too short

Note that the binary that we are trying to debug does gets executed. Its just that the debugger does not launch.

Another thing we tried from this link:

WITSC02X6385JGH:orderer sjain68$ export GOFLAGS="-ldflags=-compressdwarf=false"; dlv debug
could not launch process: decoding dwarf section info at offset 0x0: too short

Someone said to run GOCACHE=off go build ... and output of that is pasted here.

How can we fix this?

  • 写回答

1条回答 默认 最新

  • duanlie7962 2019-03-18 08:39
    关注

    I had the same issue after updateing Go. Updating Delve package from console helped:

    go get -u github.com/go-delve/delve/cmd/dlv
    
    评论

报告相同问题?

悬赏问题

  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)