如何使GDB更快 [英] How to make GDB faster

查看:133
本文介绍了如何使GDB更快的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CentOS 6上使用GDB调试复杂的应用程序。它使用自定义GCC版本(不是系统一是过时的)。这个应用程序有3个项目:2个静态库(一个是50M大小,另一个是在调试生成的大小为10M)和可执行文件,使用这些2库的代码,以及许多系统共享库。
问题是GDB是extremelly慢。我理解这个项目很大,但Visual Studio 2013调试非常快,因此可能是GDB没有正确设置工作与这个大项目。
当调试大项目时,如何使GDB快速,包括调试静态库代码?

I am debugging complex application with GDB on CentOS 6. It uses custom GCC version (not system one which is obsolete). This application constists of 3 projects: 2 static libraries (one is 50 M in size and another one is 10 M in size in debug build) and executable file that uses code from these 2 libraries, as well as a lot of system shared libraries. The problem is that GDB is extremelly slow. I understand that this project is big, but Visual Studio 2013 debugs it very quickly, so may be GDB is not correctly set up to work with that big project. How to make GDB fast when it debugs big projects, including debugging of static libraries code?

推荐答案

如果是启动时间是问题,如果你调试更多的频率比你重新编译, debuginfo索引从gdb。索引加速启动,通常由发行公司为此创建。查看手册中的.gdb_index。

If it is startup time that is the problem, and if you debug more often than you recompile, then you can create a debuginfo index from gdb. The index speeds up startup and is typically created by distros for this purpose. Look in the manual for ".gdb_index".

这篇关于如何使GDB更快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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