From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677526936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=79nrWlTUA/0LFybxOxCGLORYicd/2CGwV56zyqzvhNA=; b=a3H8nCwuA641+Abj1pKIth+Hq+Gsslg/yNblKMkHSUlg6AzfAVGIyxis2Y74LQ9XrYNh1I 6PS78FFT1+UCTB2Hxbr6l4WC5zZ7chw6bevPMa2oPSkRbq2wsvUapOIxGSkAd3aW2/1UGI zcgItw1KjvhS83Ydbt/SIPUllXsbZkw= 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) From: Aaron Merey 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 List-Id: 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); -- 2.39.2