Using perlbrew to build a perl with debugging symbols

我是研究僧i 提交于 2019-12-21 09:09:33

问题


I'm trying to track down a segmentation fault that I've been able to isolate to just a few lines of code on different versions of Perl. I use perlbrew to manage my various versions for development and testing, but it doesn't build perl with debugging symbols, so using gdb to analyse the core dump file is pretty useless.

So what's the best way to have perlbrew build with debugging symbols enabled. And if possible I'd like to be able to have it be a separate perl that I could switch to instead of overriding the standard one for the same version.


回答1:


perlbrew install -v 5.14.2 --as=5.14.2d -DEBUGGING=-g

(--as puts it under a different name, so you can keep your existing builds.)

There's also the following which includes the above and stuff you surely don't need:

perlbrew install -v 5.14.2 --as=5.14.2d -DEBUGGING=both

See INSTALL in the root dir of the Perl distro.



来源:https://stackoverflow.com/questions/9320203/using-perlbrew-to-build-a-perl-with-debugging-symbols

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!