安装软件的时候,经常会发现有一些 -dbg 的包,比如 iceweasel-dbg,软件包信息中指出这个包中包含了 iceweasel 的调试符号信息。那么调试符号信息是如何生成的呢,生成的调试符号信息又如何使用呢?
看了 strip 的 manual,发现有这样一个功能:
--only-keep-debug removing contents of any sections that would not be stripped by --strip-debug and leaving the debugging sections intact.
正是生成 debug symbol 的方法,manual 里面详细介绍了如何制作 debug symbol 文件,并且将 stripped 的可执行文件和 debug 文件关联起来的办法。
1.<Link the executable as normal. Assuming that is is called>
"foo" then...
2.<Run "objcopy --only-keep-debug foo foo.dbg" to>
create a file containing the debugging info.
3.<Run "objcopy --strip-debug foo" to create a>
stripped executable.
4.<Run "objcopy --add-gnu-debuglink=foo.dbg foo">
to add a link to the debugging info into the stripped executable.
阅读(232) | 评论(0) | 转发(0) |
<script type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/buttonLite.js#style=-1&uuid=&pophcol=3&lang=zh"></script> <script type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/bshareC0.js"></script>
看了 strip 的 manual,发现有这样一个功能:
--only-keep-debug removing contents of any sections that would not be stripped by --strip-debug and leaving the debugging sections intact.
正是生成 debug symbol 的方法,manual 里面详细介绍了如何制作 debug symbol 文件,并且将 stripped 的可执行文件和 debug 文件关联起来的办法。
1.<Link the executable as normal. Assuming that is is called>
"foo" then...
2.<Run "objcopy --only-keep-debug foo foo.dbg" to>
create a file containing the debugging info.
3.<Run "objcopy --strip-debug foo" to create a>
stripped executable.
4.<Run "objcopy --add-gnu-debuglink=foo.dbg foo">
to add a link to the debugging info into the stripped executable.
相关热门文章
给主人留下些什么吧!~~
评论热议