5
我正在使用堆栈构建静态链接二进制文件,并尝试向其添加调试符号(以下内容:https://downloads.haskell.org/~ghc/master/users-guide/debug-info.html)。但是GDB报告:no debugging symbols found
。静态链接二进制文件中缺少调试符号
我缺少什么?
我已经加入到ghc-options
在.cabal
file:-g -rtsopts
并向ld-options
:-static
。
stack install \
--install-ghc \
--split-objs \
--ghc-options="-fPIC -fllvm -pgmlo opt -pgmlc llc"
GDB被调用如下::gdb --args nodebug-exe +RTS -V0
GHC 8.2.1
所有源代码是在这里:我使用堆栈使用下面的命令建立https://github.com/carbolymer/haskell-missing-debug-symbols
也许加上--no-strip? '--no-strip:在库,可执行文件等中为所有表达式禁用DWARF调试符号剥离# – Zpalmtree
@Zpalmtree,没错。我应该看看'stack install --help' ...你可以添加它作为答案。 – carbolymer