From patchwork Mon Feb 27 19:42:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Merey X-Patchwork-Id: 65693 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 07571385B535 for ; Mon, 27 Feb 2023 19:42:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07571385B535 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677526965; bh=79nrWlTUA/0LFybxOxCGLORYicd/2CGwV56zyqzvhNA=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=IxXgfukk3NAqigW3vKRyNA/EKbfLsnFn+sVjC2n06OEZsh1dqwuJxnksaTR0pTZV6 95sTXGShQ81AqLaqqaHZzHss8RbfWrq9tQkbg0e0HRFotxSfYksaO/SPG7OTGpYpnV 31xcJIlhboNT40D9vYHQEaageg/6VroV6vUvRycQ= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id B08013858D39 for ; Mon, 27 Feb 2023 19:42:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B08013858D39 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-211-lguW7oy0PBaOT3mhAGTZhA-1; Mon, 27 Feb 2023 14:42:15 -0500 X-MC-Unique: lguW7oy0PBaOT3mhAGTZhA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2C26D185A7A4 for ; Mon, 27 Feb 2023 19:42:15 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.18.122]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC39D492C3E; Mon, 27 Feb 2023 19:42:14 +0000 (UTC) To: gdb-patches@sourceware.org Cc: Aaron Merey Subject: [PATCH 3/7] gdb/debuginfod: disable pagination during downloads Date: Mon, 27 Feb 2023 14:42:08 -0500 Message-Id: <20230227194212.348003-3-amerey@redhat.com> In-Reply-To: <20230227194212.348003-1-amerey@redhat.com> References: <20230227194212.348003-1-amerey@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Aaron Merey via Gdb-patches From: Aaron Merey Reply-To: Aaron Merey Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Disable pagination during downloads in order to avoid inconvenient continue prompts "--Type for more, q to quit...". For more discussion on this issue see the following thread https://sourceware.org/pipermail/gdb-patches/2023-February/196674.html --- gdb/debuginfod-support.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c index 12025fcf0c0..f4969e94b0a 100644 --- a/gdb/debuginfod-support.c +++ b/gdb/debuginfod-support.c @@ -292,6 +292,9 @@ debuginfod_source_query (const unsigned char *build_id, const char *srcpath, gdb::unique_xmalloc_ptr *destname) { + scoped_restore save_count_lines_printed + = make_scoped_restore (&pagination_enabled, false); + if (!debuginfod_is_enabled ()) return scoped_fd (-ENOSYS); @@ -333,6 +336,9 @@ debuginfod_debuginfo_query (const unsigned char *build_id, const char *filename, gdb::unique_xmalloc_ptr *destname) { + scoped_restore save_count_lines_printed + = make_scoped_restore (&pagination_enabled, false); + if (!debuginfod_is_enabled ()) return scoped_fd (-ENOSYS); @@ -371,6 +377,9 @@ debuginfod_exec_query (const unsigned char *build_id, const char *filename, gdb::unique_xmalloc_ptr *destname) { + scoped_restore save_count_lines_printed + = make_scoped_restore (&pagination_enabled, false); + if (!debuginfod_is_enabled ()) return scoped_fd (-ENOSYS); @@ -412,6 +421,8 @@ debuginfod_section_query (const unsigned char *build_id, #if !defined (HAVE_DEBUGINFOD_FIND_SECTION) return scoped_fd (-ENOSYS); #else + scoped_restore save_count_lines_printed + = make_scoped_restore (&pagination_enabled, false); if (debuginfod_enabled != debuginfod_lazy || !debuginfod_is_enabled ()) return scoped_fd (-ENOSYS);