Bug 140735 - Option to delay loading of shared library symbols when debugging
Summary: Option to delay loading of shared library symbols when debugging
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: HI wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 146399 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-27 20:37 UTC by Robert Knight
Modified: 2012-02-26 21:37 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Knight 2007-01-27 20:37:59 UTC
Version:           3.4 (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
Compiler:          gcc 4.1 
OS:                Linux

Starting KDE 4 applications in the debugger takes a very long time ( around a minute here ) and consumes vast amounts of memory if debugging symbols are available for all the KDE and Qt libraries.
Apparently GDB already has some mechanism to cut down the volume of symbols that it loads, but it doesn't seem to be sufficient any longer.

When running gdb from the command line, I can do this to get around it:

1.  start gdb
2.  run "set auto-solib-add off" to disable automatic loading of shared libraries
3.  start the program
4.  interupt execution using Ctrl+C
5.  run "shar libkdeinit_appname" to load the main shared library for the 
    application I am debugging, possibly repeating for QtCore and one
    or two other major libraries.

Unless serious improvements can be made in GDB itself, it would be useful to have an option to manually specify which libraries' symbols are to be loaded into the debugger.
Comment 1 Niko Sams 2010-01-02 13:36:48 UTC
*** Bug 146399 has been marked as a duplicate of this bug. ***
Comment 2 Milian Wolff 2011-02-15 19:07:36 UTC
is this still relevant? and is it really high priority?
Comment 3 Gunther Piez 2011-03-02 17:47:51 UTC
I just put a line "set auto-solib-add-off" into my .gdbinit for exactly this reason. So yes, this is still relevant, and yes needing to wait more than half a minute on 4GHz+ if you want to debug some qt/kde app and have debug symbols for those libraries installed could be considered a serious bug - I killed gdb in the first try because I thought it would hang.

This does not happen if you don't have any symbols in/for your qt/kdelibs. An easy workaround is executing the mentioned command, either manually or in the init file.
Comment 4 Robert Knight 2011-03-02 19:14:01 UTC
Yes - unless still very much relevant.  As mentioned by Gunther, the impact depends on what proportion of the Qt/KDE libraries used by an app you have debugging symbols for.  If you have debugging symbols for any of the big Qt libraries (eg. QtGui, QtWebKit) then this makes a big difference to debugger startup time.