This is the mail archive of the gdb-patches@sourceware.org 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: RFA: More concise errors for missing shared libraries


On Sat, May 13, 2006 at 11:12:22AM +0200, Mark Kettenis wrote:
> > One of the quirks of SymbianOS compared to a traditional hosted target is
> > that it's quite likely that GDB will have no symbol file at all for many of
> > the loaded libraries.  A ROM image may contain many DLLs, presented as a
> > virtual filesystem, which are effectively preloaded into the memory space of
> > every process.  A user probably only has symbol files for his own DLLs, not
> > the DLLs which provide operating system services.  So, the behavior of GDB
> > when shared libraries can not be found is much more important than on other
> > targets.
> 
> Did you consider providing stub ELF libraries for the system DLL's too?

Yes, we did.  But I concluded that I could not get them to distribute
stub ELF libraries with symbol table entries at the right addresses
(and it would probably be an invasive change to their build process).

Also, they'd be somewhat deceptive, since they wouldn't have internal
symbol table entries.  GDB ignores the ELF "length" of symbols - we
should really take advantage of that someday.

> > Right now this is really noisy.  We get a two-line error message for each
> > library from update_solib_list when we detect the new library, and another
> > one from solib_read_symbols later.  This patch condenses those into a single
> > warning:
> > 
> > warning: Could not load shared library symbols for 2 libraries, e.g. /lib/libnss_dns.so.2.
> > Do you need "set solib-search-path" or "set solib-absolute-prefix"?
> 
> I think this is bad.  I really hate it when tools give me incomplete
> error information.  Consider the situation where I have set
> solib-search-path/solib-absolute-prefix, but only have a subset of the
> libraries available.  I go and install libnss_dns.so.2, but I have no
> clue what the other library is.  I have to rerun the program in GDB to
> find out the name of the other library.
>
> To reduce the clutter, I think we should not print the
> 
>    Do you need "set solib-search-path" or "set solib-absolute-prefix"?
> 
> suggestion for every shared library, but only once, preferably at the
> end of of all output.

Would Jim's suggestion of printing out something about checking info
shared help?

Something like this:

warning: Could not load shared library symbols for 6 libraries, e.g. /lib/libc.so.6.
Try "info shared" for the full list of missing libraries.
Do you need "set solib-search-path" or "set solib-absolute-prefix"?

... later ...

warning: Could not load shared library symbols for 2 libraries, e.g. /lib/libnss_dns.so.2

-- 
Daniel Jacobowitz
CodeSourcery


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