Blame SOURCES/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch

475228
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
475228
From: Fedora GDB patches <invalid@email.com>
475228
Date: Fri, 27 Oct 2017 21:07:50 +0200
475228
Subject: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
475228
475228
;; Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
475228
;;=push+jan
475228
475228
diff --git a/gdb/build-id.c b/gdb/build-id.c
475228
--- a/gdb/build-id.c
475228
+++ b/gdb/build-id.c
475228
@@ -712,6 +712,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
475228
 #include <dlfcn.h>
475228
 #endif
475228
 
475228
+/* Workarodun https://bugzilla.redhat.com/show_bug.cgi?id=643031
475228
+   librpm must not exit() an application on SIGINT
475228
+
475228
+   Enable or disable a signal handler.  SIGNUM: signal to enable (or disable
475228
+   if negative).  HANDLER: sa_sigaction handler (or NULL to use
475228
+   rpmsqHandler()).  Returns: no. of refs, -1 on error.  */
475228
+extern int rpmsqEnable (int signum, /* rpmsqAction_t handler */ void *handler);
475228
+int
475228
+rpmsqEnable (int signum, /* rpmsqAction_t handler */ void *handler)
475228
+{
475228
+  return 0;
475228
+}
475228
+
475228
 /* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files
475228
    and avoid their duplicities during a single inferior run.  */
475228
 
475228
diff --git a/gdb/proc-service.list b/gdb/proc-service.list
475228
--- a/gdb/proc-service.list
475228
+++ b/gdb/proc-service.list
475228
@@ -37,4 +37,7 @@
475228
   ps_pstop;
475228
   ps_ptread;
475228
   ps_ptwrite;
475228
+
475228
+  /* gdb-6.6-buildid-locate-rpm.patch */
475228
+  rpmsqEnable;
475228
 };