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

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