zoukankan      html  css  js  c++  java
  • could not launch process: decoding dwarf section info at offset 0x0: too short

    Fabric调试异常

    作者在使用chaincode进行智能合约开发的过程中,使用Goland + Golang + win10_X64作为开发环境:

    GoLand 2018.1.4
    Build #GO-181.5087.39, built on May 24, 2018
    Licensed to youBBS
    
    JRE: 1.8.0_152-release-1136-b39 amd64
    JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
    Windows 10 10.0
    
    go1.11.4 windows/amd64
    

    但在调试的时候会发生如下错误:

    D:golangingo.exe test -c -tags nopkcs1 -o C:UsersNewWangAppDataLocalTemp\___TestBcoin_Init_in_github_com_utxo_chaincode.exe -gcflags "all=-N -l" github.com/utxo/chaincode #gosetup
    "E:GoLand 2018.1.4in
    unnerw.exe" D:golangingo.exe tool test2json -t C:UsersNewWang.GoLand2018.1configpluginsintellij-golibdlvwindowsdlv.exe --listen=localhost:58370 --headless=true --api-version=2 --backend=default exec C:UsersNewWangAppDataLocalTemp\___TestBcoin_Init_in_github_com_utxo_chaincode.exe -- -test.v -test.run ^TestBcoin_Init$ #gosetup
    
    could not launch process: decoding dwarf section info at offset 0x0: too short 
    

    总结网络上提出以下两种解决方案:

    1. 升级Goland 版本到2018.2以上的版本
    2. 使用 go get -u -v github.com/derekparker/delve/cmd/dlv 命令去编译新版本的dlv,然后在通过在 Help -- Edit Custom Properties 中添加: dlv.path=D:/gopath/bin/dlv.exe,来更新dlv到与go适配的版本。

    但是第二种方式经过作者的实际测试是无效的,后经过多方检索找到了真正的原因:

    在1.10以上的版本中,当应用工程引入plugin的包后debugframe会丢失,导致dlv无法使用。
    

    解决方案:

    1. 等待 1.12 版本中修复这个问题
    2. 将go的版本降低到1.9

    参考链接:

    https://youtrack.jetbrains.com/issue/GO-5446
    https://github.com/golang/go/issues/23733

  • 相关阅读:
    SP1812 LCS2
    SP1811 LCS
    P3804 【模板】后缀自动机
    P3808 【模板】AC自动机(简单版)
    P3879 [TJOI2010]阅读理解
    P2602 [ZJOI2010]数字计数
    P4719 【模板】动态dp
    P1122 最大子树和
    P3554 [POI2013]LUK-Triumphal arch
    P3565 [POI2014]HOT-Hotels
  • 原文地址:https://www.cnblogs.com/cnblogs-wangzhipeng/p/10209688.html
Copyright © 2011-2022 走看看