- Patches dropped: * fixup-gdb-6.3-gstack-20050411.patch * fixup-skip-tests.patch * gdb-6.6-buildid-locate-rpm-librpm-workaround.patch * gdb-6.6-buildid-locate-rpm.patch - Patches added: * gdb-add-missing-debug-ext-lang-hook.patch * gdb-add-missing-debug-info-python-hook.patch * gdb-add-rpm-suggestion-script.patch * gdb-do-not-import-py-curses-ascii-module.patch * gdb-handle-no-python-gdb-module.patch * gdb-merge-debug-symbol-lookup.patch * gdb-python-avoid-depending-on-the-curses-library.patch * gdb-refactor-find-and-add-separate-symbol-file.patch * gdb-reformat-missing-debug-py-file.patch * gdb-remove-path-in-test-name.patch * gdb-remove-use-of-py-isascii * gdb-sync-coffread-with-elfread.patch - Patches updated: * fixup-gdb-bz634108-solib_address.patch * gdb-6.3-gstack-20050411.patch * gdb-6.6-buildid-locate-rpm-suse.patch * gdb-6.6-buildid-locate-solib-missing-ids.patch * gdb-6.6-buildid-locate.patch * gdb-archer-next-over-throw-cxx-exec.patch * gdb-bz634108-solib_address.patch * gdb-fedora-libncursesw.patch * gdb-glibc-strstr-workaround.patch * gdb-rhbz1007614-memleak-infpy_read_memory-test.patch OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=409
44 lines
1.7 KiB
Diff
44 lines
1.7 KiB
Diff
diff --git a/gdb/python/lib/gdb/command/rpm-suggestions.py b/gdb/python/lib/gdb/command/rpm-suggestions.py
|
|
index 293b1638617..463684c1462 100644
|
|
--- a/gdb/python/lib/gdb/command/rpm-suggestions.py
|
|
+++ b/gdb/python/lib/gdb/command/rpm-suggestions.py
|
|
@@ -28,6 +28,8 @@ __missing_rpms = {}
|
|
# the prompt is shown.
|
|
__suggest_rpms = {}
|
|
|
|
+__package_to_debug_package = {}
|
|
+
|
|
|
|
# Lookup RPMs that might provide the debug information for FILENAME,
|
|
# which is a string containing the path to an object file GDB could
|
|
@@ -43,6 +45,7 @@ def find_suggestions(filename):
|
|
for h in mi:
|
|
# Build the debuginfo package name.
|
|
obj = h.format("%{name}-debuginfo-%{version}-%{release}.%{arch}")
|
|
+ debug_rpm_name = str(obj)
|
|
|
|
# Check to see if the package is installed.
|
|
mi2 = ts.dbMatch(rpm.RPMDBI_LABEL, str(obj))
|
|
@@ -52,6 +55,7 @@ def find_suggestions(filename):
|
|
# Now build the name of the package FILENAME came from.
|
|
obj = h.format("%{name}-%{version}-%{release}.%{arch}")
|
|
rpm_name = str(obj)
|
|
+ __package_to_debug_package[rpm_name] = debug_rpm_name
|
|
if not rpm_name in __missing_rpms:
|
|
__suggest_rpms[rpm_name] = True
|
|
__missing_rpms[rpm_name] = True
|
|
@@ -83,10 +87,12 @@ class RPMSuggestionHandler(gdb.missing_debug.MissingDebugHandler):
|
|
# suggests this to the user.
|
|
def before_prompt():
|
|
global __suggest_rpms
|
|
+ global __package_to_debug_package
|
|
|
|
if len(__suggest_rpms) > 0:
|
|
for p in __suggest_rpms.keys():
|
|
- print("Missing debuginfo, try: dnf debuginfo-install " + p)
|
|
+ dp = __package_to_debug_package[p]
|
|
+ print("Missing separate debuginfos, use: zypper install " + dp)
|
|
__suggest_rpms = {}
|
|
|
|
|