This commit backports several patches from upstream GDB:
7d21600b31f
dd5516bf98f
e8c3dafa5f5
1146d27749f
7db795bc67a
8f6c452b5a4
661d98a3331
6234ba17598
27807da5849
7628a997f27
These commits provide a new Python API which allows users to catch the
case where GDB tries to load an objfile, but can't find any debug
information.
I've then added a new patch which uses this Python API to hook into
GDB and make suggestions about RPMs to install that could provide
missing debug information, this should replace some of the rpm
suggestion functionality that is currently implemented within GDB's
C++ code, as such I've deleted all of the code related to opening
librpm and querying the RPM database.
There is still code in GDB which will make suggestions about
installing RPMs based on the path to the build-id symlink for the
file. This code is hit when a user tries to open a core-file and the
corresponding executable can't be found, or if a shared library
required by the core-file isn't found.
In these cases the librpm lookup would always fail anyway and we'd
just suggest that the user try to install the required package based
on the path to the build-id symlink, e.g.:
Missing separate debuginfo for the main executable file.
Try: yum --enablerepo='*debug*' install /usr/local/lib/debug/.build-id/bf/c9fbd13046db58c28ba332e6c991240e775c96
This should still work just as it did before.
Now GDB no longer links against librpm I'm able to remove all the
librpm related stuff from the configure scripts, which is a nice
cleanup.
There are a couple of patches:
gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
gdb-6.6-buildid-locate-rpm.patch
which deal exclusively with updating code (added in earlier patches)
related to the use of librpm from GDB's C++ code, these patches are
removed by this commit. Other patches are changed either by the
removal of the librpm code, or as a consequence of that code having
been removed.
I've also taken the opportunity to fix up some of the test cases which
only exist in the Fedora tree so that they will run again. This is
mostly just updating the tests to match upstream GDB's current
testsuite infrastructure, these are all pretty minor fixes.