This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Huge slowdown since 6.0


> Date: Fri, 20 Feb 2004 13:48:47 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> My point is that whether or not "break main" shows up as resolving to
> the main executable, to get it right in the general case, we also need
> shared library symbols.

Being relatively ignorant about the symtab issues, I might be missing
something, but my naive take of this is: couldn't we load the library
symbols only if the symbol FOO from a command such as "break FOO" is
not found in the main executable?

As for the shared libraries case, we could add start by loading only
user shared libraries, leaving out the system libraries.  A list of
library names known to be system libraries plus some simple logic
could accomplish that, I think.

In general, it seems to me that if a symbol typed by the user is found
neither in the executable nor in the non-system shared libraries used
by the program, that symbol name is more likely a typo than a symbol
the user really wants.  So I'd even suggest asking for confirmation
before loading the system libraries (we could have a `set' command to
avoid the confirmation, for those brave souls that debug system
libraries).

For example, even in Andrew's extreme case of "break TAB", wouldn't it
make more sense to print only the names that do not belong to the
system libraries?  Do we really think that the user wants to see names
like "__exit" or "__libc_init" or "____strtod_l_internal"?

> I discussed this at length in the last thread about multiple-address
> breakpoints.

If that discussion answers the questions I asked above, could you
please point me to the URL(s) of the relevant message(s), so that you
would not need to repeat them?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]