我怎样才能知道,如果一个库是使用-g编译? [英] How can I tell if a library was compiled with -g?

查看:97
本文介绍了我怎样才能知道,如果一个库是使用-g编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Linux的x86的一些编译库,我想快速确定他们是否与调试符号编译。

I have some compiled libraries on x86 Linux and I want to quickly determine whether they were compiled with debugging symbols.

推荐答案

如果你在Linux上,使用objdump的--debugging运行。应该有库中的每个对象文件的条目。对于没有调试符号的目标文件,你会看到类似这样的:

If you're running on Linux, use 'objdump --debugging'. There should be an entry for each object file in the library. For object files without debugging symbols, you'll see something like:

objdump --debugging libvoidincr.a
In archive libvoidincr.a:

voidincr.o:     file format elf64-x86-64

如果有调试符号,输出会更加详细。

If there are debugging symbols, the output will be much more verbose.

这篇关于我怎样才能知道,如果一个库是使用-g编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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