简体   繁体   English

GDB:如何找到已加载符号(msymbols,psymbols,符号)的内存总大小?

[英]GDB: How can I find the in-memory total size of loaded symbols (msymbols, psymbols, symbols)?

Our dev environment is configured in such a way that when we run the debug version of our code, it breaks into gdb on a crash or ^C. 我们的开发环境的配置方式使我们在运行代码的调试版本时,在崩溃或^ C时会闯入gdb。 With some recent changes this is not happening anymore (exiting the program instead of breaking into gdb), and I'm suspecting the increase in symbols size is causing this issue. 通过最近的一些更改,这种情况不再发生(退出程序而不是进入gdb),并且我怀疑符号大小的增加会导致此问题。

Is there a way to find the sizes of msymbols, psymbols & symbols (memory consumption of symbols when they are loaded into the gdb session)? 有没有办法找到msymbols,psymbols和符号的大小(将符号加载到gdb会话中时的内存消耗)?

Also, is there a way to limit the memory used for symbols in gdb? 另外,有没有办法限制gdb中用于符号的内存? Google mentions HP's version supports such feature - and with other versions the only way out is to disable shared lib symbols auto-load and load them on demand. Google提到HP的版本支持这种功能-对于其他版本,唯一的解决方法是禁用共享库符号自动加载并按需加载它们。 What would it take to have HP like support on, say FreeBSD? FreeBSD说,要获得HP支持就需要什么?

Thankyou. 谢谢。

There is no way to get that information directly. 无法直接获取该信息。 You could add it pretty easily, but I personally wouldn't bother. 您可以很轻松地添加它,但是我个人不会打扰。

Your report isn't really detailed enough to understand what is going on. 您的报告不够详细,不足以了解正在发生的情况。 However I tend to doubt the behavior you are seeing is caused by gdb's size. 但是我倾向于怀疑您看到的行为是由gdb的大小引起的。

You can disable automatic loading of shared library info using set auto-solib-add . 您可以使用set auto-solib-add禁用自动加载共享库信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM