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.133.124]) by sourceware.org (Postfix) with ESMTPS id A861E3858C54 for ; Wed, 24 May 2023 09:38:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A861E3858C54 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=1684921089; 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: in-reply-to:in-reply-to:references:references; bh=FzmLg4qBBXoZ/27gJvJqtML6+WOVxIgrm+iL25ybUIU=; b=WvU7xfqZHeqTBrwwyBfv+J2ek4kCo1idd3Hbuu8YfpWSeuI75IacSSul49YBYwiiQYhPee hrrSGv/lEnakO5OlhrxAWFAB4DNrLwSCt3XGb+rbsIZwJHP0GzJFGgAreyWpQnbq2W/oNA Imla8NxrBnk/C5F3OjkiajdopYUABIA= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-MypaCqPdNvu4qp9qbmnVRw-1; Wed, 24 May 2023 05:38:08 -0400 X-MC-Unique: MypaCqPdNvu4qp9qbmnVRw-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3f42b226871so3363815e9.0 for ; Wed, 24 May 2023 02:38:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684921086; x=1687513086; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FzmLg4qBBXoZ/27gJvJqtML6+WOVxIgrm+iL25ybUIU=; b=AB0n8woXpBLGz4oCEfMhDuQFhjhYnzMEcZY+cTbE8CiO/3MP2hScq7hoK8aA+k7YAA c/BNWBNVK1H35fcPfzz0LkqUIJAJDfQ4VC5aLBC9JNiOCIDY/FvmO3wUvTmQLwj42NYT GctXuI06JYvWOkV6tVStdK+o7LF088xQKWzfaY1TQjX39OhBf0AYyv8XBp4dZk+xhvrj yaZQgxAsqqCHASHDUg/W5MJu17GBb5FwzKDo5ZwNzRtueduYIT+xYlDKRJNyz48Kg9nn Yce9acCBazKbscQltHm3bXGqN4JqYPM6Zp0bjSAHUtBbyysQSVJrLWsQW3i3lzsaGwWR p5Nw== X-Gm-Message-State: AC+VfDz7T7199Vqb3TVlDRh7FV0aUY7B+mwBxL9LeJ3TpkgTr0k4cUL/ WRk9Mo2bADEytGP4b1teF9DZkiveXWfzQSOFEHNZA8hE4sJH30A5j4dRWQds7KiiL0EY/TnF4bN SO1qjaYnTA774pW+vmd5uhz1DU73VNpPp+DU9fsrtd8SZYhhsf4c7Oqt3qdoGwp18pkiISkCqwZ xU0XAAHQ== X-Received: by 2002:a7b:cbc1:0:b0:3f5:39:240c with SMTP id n1-20020a7bcbc1000000b003f50039240cmr11818303wmi.27.1684921086275; Wed, 24 May 2023 02:38:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ITGC78NYwDSsZm3wukuHk8TAlq1IurlOqFngtc8Drz/PnRXNTW1y0dXKw2bquizCzbO2ykQ== X-Received: by 2002:a7b:cbc1:0:b0:3f5:39:240c with SMTP id n1-20020a7bcbc1000000b003f50039240cmr11818282wmi.27.1684921085852; Wed, 24 May 2023 02:38:05 -0700 (PDT) Received: from localhost (11.72.115.87.dyn.plus.net. [87.115.72.11]) by smtp.gmail.com with ESMTPSA id l5-20020a1c7905000000b003f4289b18a7sm1752067wme.5.2023.05.24.02.38.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 02:38:05 -0700 (PDT) From: Andrew Burgess To: Aaron Merey via Gdb-patches , gdb-patches@sourceware.org Cc: Aaron Merey Subject: Re: [PATCH 3/7] gdb/debuginfod: disable pagination during downloads In-Reply-To: <20230227194212.348003-3-amerey@redhat.com> References: <20230227194212.348003-1-amerey@redhat.com> <20230227194212.348003-3-amerey@redhat.com> Date: Wed, 24 May 2023 10:38:04 +0100 Message-ID: <87y1le6pdv.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.7 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,T_SCC_BODY_TEXT_LINE 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: Aaron Merey via Gdb-patches writes: > 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 Is this patch critical to the new functionality in this series? If it's not then you might be better spinning this patch into it's own thread. I also echo Tom's query about why this change is needed. I haven't read the thread you reference above -- I want to review the rest of this series first -- but if there's good justification for this change in that thread then it would be nice to see that in the commit message, the commit message is carried with the code, but the mail archive might disappear in the future. > --- > 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); Given you have several uses of the same pattern, it might be nice to add a new 'scoped_restore_pagination' class, we already have lots of scoped_restore_XXX specialisation classes. Thanks, Andrew > + > 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