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.
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]
Maybe this would be more bearable with lazy expansion, see bug #29398