public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Backport upstream patch "[PR gdb/27026] CTRL-C is ignored
Date: Sun, 28 Jun 2026 00:00:31 GMT	[thread overview]
Message-ID: <178260483142.1.971378330130710810.rpms-gdb-e4fab2956479@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : e4fab2956479d81325bee695196243dfffb1d797
            Author : Alexandra Hájková <ahajkova@redhat.com>
            Date   : 2022-01-11T13:29:49+01:00
            Stats  : +73/-3 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/e4fab2956479d81325bee695196243dfffb1d797?branch=gdb-17.2-rebase-f44

            Log:
            Backport upstream patch "[PR gdb/27026] CTRL-C is ignored

when debug info is downloaded" (RHBZ 2024875, Aaron Merey).

---
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index 0793815..9bf8e3a 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -351,3 +351,7 @@ Patch084: gdb-rhbz2024875-fix-unittest-failure.patch
 #scalar values by value
 Patch085: gdb-rhbz202487-rework-set-debuginfod.patch
 
+#Backport upstream commit from Aaron Merey
+#b9db26b4c44 [PR gdb/27026] CTRL-C is ignored when debug info is downloaded
+Patch086: gdb-rhbz2024875-pr27026.patch
+

diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index 9594d35..965fc8c 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -83,3 +83,4 @@
 %patch083 -p1
 %patch084 -p1
 %patch085 -p1
+%patch086 -p1

diff --git a/_patch_order b/_patch_order
index fd8ddc4..b921d85 100644
--- a/_patch_order
+++ b/_patch_order
@@ -83,3 +83,4 @@ gdb-rhbz2024875-expand-documentation-for-debuginfod.patch
 gdb-rhbz2024875-set_show-for-managing-debuginfod.patch
 gdb-rhbz2024875-fix-unittest-failure.patch
 gdb-rhbz202487-rework-set-debuginfod.patch
+gdb-rhbz2024875-pr27026.patch

diff --git a/gdb-rhbz2024875-pr27026.patch b/gdb-rhbz2024875-pr27026.patch
new file mode 100644
index 0000000..f84f134
--- /dev/null
+++ b/gdb-rhbz2024875-pr27026.patch
@@ -0,0 +1,60 @@
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova@redhat.com>
+Date: Tue, 11 Jan 2022 13:22:44 +0100
+Subject: gdb-rhbz2024875-pr27026.patch
+
+;;Backport upstream commit from Aaron Merey
+;;b9db26b4c44 [PR gdb/27026] CTRL-C is ignored when debug info is downloaded
+
+[PR gdb/27026] CTRL-C is ignored when debug info is downloaded
+
+During debuginfod downloads, ctrl-c should result in the download
+being cancelled and skipped.  However in some cases, ctrl-c fails to
+get delivered to gdb during downloading.  This can result in downloads
+being unskippable.
+
+Fix this by ensuring that target_terminal::ours is in effect for the
+duration of each download.
+
+Co-authored-by: Tom de Vries <tdevries@suse.de>
+https://sourceware.org/bugzilla/show_bug.cgi?id=27026#c3
+
+diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c
+--- a/gdb/debuginfod-support.c
++++ b/gdb/debuginfod-support.c
+@@ -23,6 +23,7 @@
+ #include "gdbsupport/gdb_optional.h"
+ #include "cli/cli-cmds.h"
+ #include "cli/cli-style.h"
++#include "target.h"
+ 
+ /* Set/show debuginfod commands.  */
+ static cmd_list_element *set_debuginfod_prefix_list;
+@@ -208,6 +209,13 @@ debuginfod_source_query (const unsigned char *build_id,
+   user_data data ("source file", srcpath);
+ 
+   debuginfod_set_user_data (c, &data);
++  gdb::optional<target_terminal::scoped_restore_terminal_state> term_state;
++  if (target_supports_terminal_ours ())
++    {
++      term_state.emplace ();
++      target_terminal::ours ();
++    }
++
+   scoped_fd fd (debuginfod_find_source (c,
+ 					build_id,
+ 					build_id_len,
+@@ -246,6 +254,13 @@ debuginfod_debuginfo_query (const unsigned char *build_id,
+   user_data data ("separate debug info for", filename);
+ 
+   debuginfod_set_user_data (c, &data);
++  gdb::optional<target_terminal::scoped_restore_terminal_state> term_state;
++  if (target_supports_terminal_ours ())
++    {
++      term_state.emplace ();
++      target_terminal::ours ();
++    }
++
+   scoped_fd fd (debuginfod_find_debuginfo (c, build_id, build_id_len,
+ 					   &dname));
+   debuginfod_set_user_data (c, nullptr);

diff --git a/gdb.spec b/gdb.spec
index 317c3a6..418628a 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -1144,15 +1144,19 @@ fi
 %endif
 
 %changelog
-* Tue Jan 11 2021 Alexandra Hájková - 11.1-8
+* Tue Jan 11 2022 Alexandra Hájková - 11.1-8
+- Backport upstream patch "[PR gdb/27026] CTRL-C is ignored
+  when debug info is downloaded" (RHBZ 2024875, Aaron Merey).
+
+* Tue Jan 11 2022 Alexandra Hájková - 11.1-8
 - Backport upstream patch "rework "set debuginfod" commands"
   (RHBZ 2024875, Simon Marchi).
 
-* Tue Jan 11 2021 Alexandra Hájková - 11.1-8
+* Tue Jan 11 2022 Alexandra Hájková - 11.1-8
 - Backport upstream patch "Fix unittest.exp failure due to 'set debuginfod' addition"
   (RHBZ 2024875, Tom Tromey).
 
-* Mon Jan 10 2021 Alexandra Hájková - 11.1-8
+* Mon Jan 10 2022 Alexandra Hájková - 11.1-8
 - Add -Wno-unused-function to --enable-gdb-build-warnings to prevent the build failure:
   "../../gdb/c-exp.y:3455:1: error: 'void c_print_token(FILE*, int, YYSTYPE)'
   defined but not used [-Werror=unused-function]"

                 reply	other threads:[~2026-06-28  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260483142.1.971378330130710810.rpms-gdb-e4fab2956479@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox