From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OPfHMFoVzl9LQQAAWB0awg (envelope-from ) for ; Mon, 07 Dec 2020 06:43:22 -0500 Received: by simark.ca (Postfix, from userid 112) id BAF051F0B8; Mon, 7 Dec 2020 06:43:22 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id F126D1EFBB for ; Mon, 7 Dec 2020 06:43:21 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E6EC3857824; Mon, 7 Dec 2020 11:43:21 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 6B7DA3857824 for ; Mon, 7 Dec 2020 11:43:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6B7DA3857824 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7D8E2AC90 for ; Mon, 7 Dec 2020 11:43:17 +0000 (UTC) From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] gdb: print size of downloaded debuginfod binary To: gdb-patches@sourceware.org Message-ID: <6ad82f30-0ca3-8b19-2907-d71f0dfecafe@suse.cz> Date: Mon, 7 Dec 2020 12:43:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" With the patch, one can see now: Reading symbols from /usr/bin/gcc... Downloading 2.69 MiB separate debug info for /usr/bin/gcc... Downloading 1.00 MiB separate debug info for /lib64/ld-linux-x86-64.so.2... Downloading 10.72 MiB separate debug info for /lib64/libc.so.6... ... ChangeLog: * gdb/debuginfod-support.c (progressfn): Print size of the downloaded debunginfod binary. --- gdb/debuginfod-support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c index e21b2f40ca..ffc832e936 100644 --- a/gdb/debuginfod-support.c +++ b/gdb/debuginfod-support.c @@ -84,8 +84,8 @@ progressfn (debuginfod_client *c, long cur, long total) { /* Print this message only once. */ data->has_printed = true; - printf_filtered ("Downloading %s %ps...\n", - data->desc, + printf_filtered ("Downloading %.2f MiB %s %ps...\n", + 1.0f * total / (1024 * 1024), data->desc, styled_string (file_name_style.style (), data->fname)); } -- 2.29.2