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 E83A33858D26 for ; Fri, 7 Jun 2024 23:27:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E83A33858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E83A33858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717802837; cv=none; b=fJV8RlmZnKi5N4nGHIRxP1s+YyiONBmF+vEcrPUK6K7h5bd4A8RdAAtlu6RlV9mhaiTY2F5Fcth1qIlWj78Jn0T+QjW9DzNZBVVlpGUGCxCGtCj75S/0U+Vu1WDljGIJrLODO3Ddsn+hSfyP5sq1THUgWpCRpLLkdUm0UJcBmM4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717802837; c=relaxed/simple; bh=+R6b8U9ZSW6oes84rZZqqeDMpEp1HhDLyUAomdaVook=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=c1QAzoQoiPnWDfdyVzy6KNdRdYhFplZRiQa+vrxqjfjPpE6uTzGBUfVQTH5qlJI6sM5UxhEkuvzedcbWxx2PxphIGGyOO3qdlLbOamgxuGLYaHw83UItG8aFXO7HoHTU882S0bLCEBpzBtTw/9u752a89jr1qfbpev7EOrpwqfE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717802834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x4OptIAXSZaEDVCTAGYrA2gQQCuV1DfmZhmm0ynJn4c=; b=Xlw1Xqun0DHjlyTrI/SLsyI9vaSz8mNExXiPzn35pDAiywLWaNnlwWToQs0cfRCMG4YpP0 1BTVKYzAEgudJZb2C5YlEvglbd0cM5+sC0w7pluq3eTZ4ICC6VvosW+eAqPwvT7nb4kn9Q mWvrg/m35MUXkVrObEX+Hek6l3oSuAE= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-583-X8Umka9GNMadh5oywyczqg-1; Fri, 07 Jun 2024 19:27:11 -0400 X-MC-Unique: X8Umka9GNMadh5oywyczqg-1 Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-70287dabb74so2445798b3a.2 for ; Fri, 07 Jun 2024 16:27:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717802830; x=1718407630; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=x4OptIAXSZaEDVCTAGYrA2gQQCuV1DfmZhmm0ynJn4c=; b=E6UNh1XDAeW23GZsabzshNuJ7i25zP1gyG1phx5K/yh9nCSenKa84S1UDhigODdrbJ /n2syxgmc/Vh1Jw7tllgRMjTauYGOhVKH42EfZE/1sLjKpvlRDvUTC9pKIZMC2lAA4of zAzJgDN2888YidX3JNm0qEw1fSPje3Ge6VwC9tt8sUvjYdvTP52FyBlWtpCfHGJai9e8 G4XhN2KvuY2tv/zGichkXNBysc8rlaropA+Ak6zUmPEdFlJovOxUR6zUt8b1LllyrsPW CGSFpETaGr1Q50jbJPvWS4ZeLxo03ImT4sfJDDO286yOrf+9QJG8CY4Y3SnK0MWU3Qv/ rtIw== X-Forwarded-Encrypted: i=1; AJvYcCWPGMOPb07K1XzafqfaqfEh7GtPi22EQLu7z66LyCnpQmLBOnG3G7h+yqpUSaD3lRVxBkuWC+M9BOR6S49uH4mFWYKjgdEB2oFdvA== X-Gm-Message-State: AOJu0YwXBR2cxT8rRgzFlscFbX2LrPie/F2B6LJmhJ8OVgnYPW6a230X eEe0lsLZ+X+WhOqrqV8ua6LmdTE2g5dizObkjecYLKSUAmsjHOemFlYASA6a4/HO73Zh5OXs6Vk TvgqSMrOiGTHha+1ZQC04MLEh06+Jf1IJRRX9gwThRrHfnhnQOMtyuYwuZrY= X-Received: by 2002:a05:6a00:4fc3:b0:702:1be9:eb37 with SMTP id d2e1a72fcca58-7040c74dac4mr4207338b3a.28.1717802829873; Fri, 07 Jun 2024 16:27:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwBBfZvy1+1ci+am0Zce4T7YTLcuJn1yrFTiOdpDACABAhotqvtvw7kHYxwwo7G1I5xZVfkg== X-Received: by 2002:a05:6a00:4fc3:b0:702:1be9:eb37 with SMTP id d2e1a72fcca58-7040c74dac4mr4207322b3a.28.1717802829340; Fri, 07 Jun 2024 16:27:09 -0700 (PDT) Received: from [150.1.200.127] (174-21-149-133.tukw.qwest.net. [174.21.149.133]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-703fd50dc13sm3066228b3a.189.2024.06.07.16.27.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jun 2024 16:27:08 -0700 (PDT) Message-ID: <48e47005-fb83-4eb6-a3dd-562d258ec4fb@redhat.com> Date: Fri, 7 Jun 2024 16:27:08 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PING*4][PATCH v4] gdb/debuginfod: Ctrl-C asks to cancel further downloads To: Aaron Merey , gdb-patches@sourceware.org References: <20240203021515.705567-1-amerey@redhat.com> From: Keith Seitz In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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: Hi, Aaron, Thank you so much for your continued patience. I *really* like this feature, and I may remove "set debuginfod enabled off" from my .gdbinit if/when this lands... In an effort to nudge this along, I've played with this a bit, and perused the code. Everything looks okay. I just have one VERY minor request -- which you are free to ignore. Consider the case where the user interrupts at the prompt. In the below example, I use emacs. It looks something like this (my comments appear inline, HTML-like): $ gdb g -nx -iex "set height 0" /usr/bin/emacs Reading symbols from /usr/bin/emacs... This GDB supports auto-downloading debuginfo from the following URLs: Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. Downloading separate debug info for /usr/bin/emacs-29.3-gtk+x11 [#### ] 8% (19.03 M)^CCancelling download of separate debug info for /usr/bin/emacs-29.3-gtk+x11... Cancel further downloading for this session? (y or [n]) Debuginfod has been disabled. To re-enable use the 'set debuginfod enabled' command. Reading symbols from .gnu_debugdata for /usr/bin/emacs-29.3-gtk+x11... (No debugging symbols found in .gnu_debugdata for /usr/bin/emacs-29.3-gtk+x11) I have to admit, I find the "Debuginfod has been disabled." message a bit user unfriendly: >>>>> + if (debuginfod_cancel == debuginfod_all) >>>>> + { >>>>> + if (extra_nl) >>>>> + gdb_printf (outstream, "\n"); >>>>> + >>>>> + gdb_printf (outstream, >>>>> + _("Debuginfod has been disabled.\nTo re-enable " >>>>> + "use the 'set debuginfod enabled' command.\n")); >>>>> + debuginfod_enabled = debuginfod_off; >>>>> + } Might I cajole you to instead consider something like "Interrupted -- debuginfod will be disabled." (and then keep the rest of the messaging) This way, the user isn't quite so surprised by the message. Gdb could just have as easily just ignored sigint at the prompt. [Although that paradigm is less gdb-y to do than other programs.] Just a thought. Reviewed-by: Keith Seitz Keith