Bug 13511 - 'info variable' and 'info functions' very slow and memory cosuming
Summary: 'info variable' and 'info functions' very slow and memory cosuming
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: symtab (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2011-12-16 17:11 UTC by Andre'
Modified: 2012-01-11 20:25 UTC (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Andre' 2011-12-16 17:11:21 UTC
When starting a "system" libreoffice from ubuntu 11.04, and attaching gdb, 'info variables' takes more then a minute to start producing output. 

When doing the same with a debug build of the a Qt based application (I am use Qt Creator itself as test case), gdb starts eating all available memory at a rate of several gigabytes per minute.
Comment 1 dje 2012-01-11 20:25:51 UTC
gdb does full symtab expansion here which will use a lot of debug info.

One thought is to have enough information to be able to avoid that.
E.g., could .gdb_index include enough info to avoid having to do full symtab expansion? [that also has problems, but "info var|fun|type" is common enough that triggering an explosion of debug info reading is annoying and worth avoiding]
[and similarly for psymtabs, as well as maybe enhancing pubnames/pubtypes]

Another thought is to be more selective with debug info reading.
Is it possible to read only the parts of the CU (dwarf-speak) that we need?

Another thought is to throw out the info as we're finished using it, perhaps guided by various parameters.
[we'll have to read it again, but that's preferable to bringing a machine to a crawl]