- Fix SLE-11 build. Gdb 9.1 requires make 3.82, but SLE-11 has make 3.81: * gdbserver-fix-build-with-make-3.81.patch - Fix patch context: * gdb-fix-the-thread-pool.c-compilation.patch - Fix build error due to missing DIAGNOSTIC_IGNORE_UNUSED_FUNCTION. * gdb-fix-the-thread-pool.c-compilation.patch - Drop ChangeLog part of patch: * gdb-fix-unused-function-error.patch - Fix Werror=unused-function with gcc 4.8 (for Leap 42.3). * gdb-fix-unused-function-error.patch - Require %{suse_version} >= 1500 for --with-system-readline. - Rebase to 9.1 release (as in fedora 32 @ 1735910). * Breakpoints on nested functions and subroutines in Fortran. * Multithreaded symbol loading, disabled by default. Enable using 'maint set worker-threads unlimited'. * Multi-target debugging support. * New command pipe. * New command set logging debugredirect [on|off]. * New fortran commands info modules, info module functions, info module variables. - Fedora-specific patches dropped: * gdb-libexec-add-index.patch * gdb-6.3-rh-testversion-20041202.patch * gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch - Obsoleted fedora patches dropped: * gdb-6.5-bz216711-clone-is-outermost.patch * gdb-6.6-scheduler_locking-step-is-default.patch * gdb-6.8-bz436037-reg-no-longer-active.patch * gdb-bz541866-rwatch-before-run.patch * gdb-bz568248-oom-is-error.patch * gdb-follow-child-stale-parent.patch * gdb-readline62-ask-more-rh.patch * gdb-rhbz1371380-gcore-elf-headers.patch * gdb-rhbz1553086-binutils-warning-loadable-section-outside-elf.patch * gdb-rhbz1704406-disable-style-log-output-1of3.patch * gdb-rhbz1704406-disable-style-log-output-2of3.patch * gdb-rhbz1704406-disable-style-log-output-3of3.patch * gdb-rhbz1708192-parse_macro_definition-crash.patch * gdb-rhbz1723564-gdb-crash-PYTHONMALLOC-debug.patch * gdb-rhbz795424-bitpos-20of25.patch * gdb-rhbz795424-bitpos-21of25.patch * gdb-rhbz795424-bitpos-22of25.patch * gdb-rhbz795424-bitpos-23of25.patch * gdb-rhbz795424-bitpos-25of25-test.patch * gdb-rhbz795424-bitpos-25of25.patch * gdb-rhbz795424-bitpos-arrayview.patch * gdb-rhbz795424-bitpos-lazyvalue.patch * gdb-testsuite-readline63-sigint.patch - Fedora patches added: * gdb-rhbz1818011-bfd-gcc10-error.patch - Obsoleted patched dropped: * gdb-fix-s390-build.diff * gdb-fix-riscv-tdep.patch * gdb-testsuite-add-missing-initial-prompt-read-in-multidictionary.exp.patch * gdb-testsuite-pie-no-pie.patch * gdb-testsuite-read1-fixes.patch * gdb-testsuite-i386-pkru-exp.patch * gdb-s390-handle-arch13.diff * gdb-fix-heap-use-after-free-in-typename-concat.patch * gdb-dwarf-reader-reject-sections-with-invalid-sizes.patch * gdb-0001-remove-alloca-0-calls.patch * gdb-arch13-1.diff * gdb-arch13-2.diff * gdb-arch13-3.diff * bfd-change-num_group-to-unsigned-int.patch * gdb-fix-incorrect-use-of-is-operator-for-comparison-in-python-lib-gdb-command-prompt.py.patch * gdb-symtab-prefer-var-def-over-decl.patch * gdb-only-force-interp_console-ui_out-for-breakpoint-commands-in-mi-mode.patch * gdb-testsuite-8.3-kfail-xfail-unsupported.patch - Backport from master: * gdb-fix-debug-agent-odr-bool-int.patch * gdb-fix-python3.9-related-runtime-problems.patch OBS-URL: https://build.opensuse.org/request/show/822281 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=251
124 lines
3.9 KiB
Diff
124 lines
3.9 KiB
Diff
Index: gdb-9.1/gdb/build-id.c
|
|
===================================================================
|
|
--- gdb-9.1.orig/gdb/build-id.c
|
|
+++ gdb-9.1/gdb/build-id.c
|
|
@@ -861,19 +861,17 @@ missing_rpm_enlist_1 (const char *filena
|
|
#endif
|
|
{
|
|
Header h;
|
|
- char *debuginfo, **slot, *s, *s2;
|
|
+ char *debuginfo, **slot;
|
|
errmsg_t err;
|
|
- size_t srcrpmlen = sizeof (".src.rpm") - 1;
|
|
- size_t debuginfolen = sizeof ("-debuginfo") - 1;
|
|
rpmdbMatchIterator mi_debuginfo;
|
|
|
|
h = rpmdbNextIterator_p (mi);
|
|
if (h == NULL)
|
|
break;
|
|
|
|
- /* Verify the debuginfo file is not already installed. */
|
|
-
|
|
- debuginfo = headerFormat_p (h, "%{sourcerpm}-debuginfo.%{arch}",
|
|
+ /* The allocated memory gets utilized below for MISSING_RPM_HASH. */
|
|
+ debuginfo = headerFormat_p (h,
|
|
+ "%{name}-debuginfo-%{version}-%{release}.%{arch}",
|
|
&err);
|
|
if (!debuginfo)
|
|
{
|
|
@@ -881,60 +879,19 @@ missing_rpm_enlist_1 (const char *filena
|
|
err);
|
|
continue;
|
|
}
|
|
- /* s = `.src.rpm-debuginfo.%{arch}' */
|
|
- s = strrchr (debuginfo, '-') - srcrpmlen;
|
|
- s2 = NULL;
|
|
- if (s > debuginfo && memcmp (s, ".src.rpm", srcrpmlen) == 0)
|
|
- {
|
|
- /* s2 = `-%{release}.src.rpm-debuginfo.%{arch}' */
|
|
- s2 = (char *) memrchr (debuginfo, '-', s - debuginfo);
|
|
- }
|
|
- if (s2)
|
|
- {
|
|
- /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
|
|
- s2 = (char *) memrchr (debuginfo, '-', s2 - debuginfo);
|
|
- }
|
|
- if (!s2)
|
|
- {
|
|
- warning (_("Error querying the rpm file `%s': %s"), filename,
|
|
- debuginfo);
|
|
- xfree (debuginfo);
|
|
- continue;
|
|
- }
|
|
- /* s = `.src.rpm-debuginfo.%{arch}' */
|
|
- /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
|
|
- memmove (s2 + debuginfolen, s2, s - s2);
|
|
- memcpy (s2, "-debuginfo", debuginfolen);
|
|
- /* s = `XXXX.%{arch}' */
|
|
- /* strlen ("XXXX") == srcrpmlen + debuginfolen */
|
|
- /* s2 = `-debuginfo-%{version}-%{release}XX.%{arch}' */
|
|
- /* strlen ("XX") == srcrpmlen */
|
|
- memmove (s + debuginfolen, s + srcrpmlen + debuginfolen,
|
|
- strlen (s + srcrpmlen + debuginfolen) + 1);
|
|
- /* s = `-debuginfo-%{version}-%{release}.%{arch}' */
|
|
|
|
+ /* Verify the debuginfo file is not already installed. */
|
|
/* RPMDBI_PACKAGES requires keylen == sizeof (int). */
|
|
/* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */
|
|
mi_debuginfo = rpmtsInitIterator_p (ts, (rpmTag) RPMDBI_LABEL, debuginfo, 0);
|
|
- xfree (debuginfo);
|
|
if (mi_debuginfo)
|
|
{
|
|
+ xfree (debuginfo);
|
|
rpmdbFreeIterator_p (mi_debuginfo);
|
|
count = 0;
|
|
break;
|
|
}
|
|
|
|
- /* The allocated memory gets utilized below for MISSING_RPM_HASH. */
|
|
- debuginfo = headerFormat_p (h,
|
|
- "%{name}-%{version}-%{release}.%{arch}",
|
|
- &err);
|
|
- if (!debuginfo)
|
|
- {
|
|
- warning (_("Error querying the rpm file `%s': %s"), filename,
|
|
- err);
|
|
- continue;
|
|
- }
|
|
-
|
|
/* Base package name for `debuginfo-install'. We do not use the
|
|
`yum' command directly as the line
|
|
yum --enablerepo='*debug*' install NAME-debuginfo.ARCH
|
|
@@ -1076,10 +1033,7 @@ missing_rpm_list_print (void)
|
|
missing_rpm_list_entries = 0;
|
|
|
|
printf_unfiltered (_("Missing separate debuginfos, use: %s"),
|
|
-#ifdef DNF_DEBUGINFO_INSTALL
|
|
- "dnf "
|
|
-#endif
|
|
- "debuginfo-install");
|
|
+ "zypper install");
|
|
for (const char *el : array)
|
|
{
|
|
puts_unfiltered (" ");
|
|
@@ -1287,13 +1241,12 @@ debug_print_missing (const char *binary,
|
|
fprintf_unfiltered (gdb_stdlog,
|
|
_("Missing separate debuginfo for %s\n"), binary);
|
|
if (debug != NULL)
|
|
- fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
|
|
-#ifdef DNF_DEBUGINFO_INSTALL
|
|
- "dnf"
|
|
-#else
|
|
- "yum"
|
|
-#endif
|
|
- " --enablerepo='*debug*' install", debug);
|
|
+ {
|
|
+ const char *p = strrchr (debug, '/');
|
|
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s%.2s%.38s\"\n"),
|
|
+ "zypper install -C \"debuginfo(build-id)=",
|
|
+ p - 2, p + 1);
|
|
+ }
|
|
}
|
|
}
|
|
|