使用 perlbrew 构建带有调试符号的 perl [英] Using perlbrew to build a perl with debugging symbols

查看:56
本文介绍了使用 perlbrew 构建带有调试符号的 perl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试追踪分段错误,我已经能够将其隔离到不同 Perl 版本上的几行代码中.我使用 perlbrew 来管理我用于开发和测试的各种版本,但它没有使用调试符号构建 perl,因此使用 gdb 分析核心转储文件非常无用.

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.

那么在启用调试符号的情况下进行 perlbrew 构建的最佳方法是什么.如果可能的话,我希望能够让它成为一个单独的 perl,我可以切换到它而不是覆盖同一版本的标准 perl.

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.

推荐答案

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

(--as 将它放在不同的名称下,因此您可以保留现有的构建.)

(--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

查看根目录中的INSTALLPerl 发行版.

See INSTALL in the root dir of the Perl distro.

这篇关于使用 perlbrew 构建带有调试符号的 perl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆