Shared libraries and separate debugging files

Worley, Dale R (Dale)
2011-08-24T20:02:57Z

I'm having a devil of a time getting GDB to work properly. Specifically, I can't get it
to find the separate debugging file for a shared library.

There is a command `set solib-absolute-prefix' that will tell GDB where to look for
shared libraries. But a while back I looked carefully and could not find how to set where
the corresponding separate debugging files were searched for. In particular, the
solib-absolute-prefix is applied *before* applying the rule "in a subdirectory whose
name is identical to the leading directories of the executable's absolute file name"
I managed to work around this with a deep nest of special-purpose directories and
symbolic links.

Has anyone out there gotten separate debugging files to work with shared libraries
in a clean way?

Searching again, I see the following text in the info file "Separate Debug Files":

* For the "debug link" method, GDB looks up the named file in the
directory of the executable file, then in a subdirectory of that
directory named `.debug', and finally under the global debug
directory, in a subdirectory whose name is identical to the leading
directories of the executable's absolute file name.
[...]
You can set the global debugging info directory's name, and view the
name GDB is currently using.

However, nothing further on the page tells how to get or set the "global debugging
info directory". Is this idea related to the *list* of directories described for
"set debug-file-directory"?

Thanks for any help you can give me,

Dale