From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3596 invoked by alias); 5 Sep 2006 07:25:00 -0000 Received: (qmail 3571 invoked from network); 5 Sep 2006 07:24:51 -0000 Received: from unknown (80.67.18.14) by sourceware.org with QMTP; 5 Sep 2006 07:24:51 -0000 Received: (qmail 8748 invoked from network); 5 Sep 2006 07:24:50 -0000 Received: from unknown (HELO ibox.ronetix.at) (301615@[80.109.6.193]) (envelope-sender ) by smtprelay02.ispgateway.de (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 5 Sep 2006 07:24:50 -0000 Received: from [192.168.3.15] (ilkobox [192.168.3.15]) by ibox.ronetix.at (8.12.8/8.12.8) with ESMTP id k857OmkN002192 for ; Tue, 5 Sep 2006 09:24:48 +0200 Message-ID: <44FD2640.7080605@ronetix.at> Date: Tue, 05 Sep 2006 07:25:00 -0000 From: Ilko Iliev User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: "Transfer rate" patch Content-Type: multipart/mixed; boundary="------------080606050903040500050807" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00016.txt.bz2 This is a multi-part message in MIME format. --------------080606050903040500050807 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 286 Hi, I found a small bug by the calculating of the transfer rate at the "load" command - if the download image size or the download speed is higher then occurs overflow and the printed information is wrong. I attached a patch for this problem. regards, Ilko Iliev www.ronetix.at --------------080606050903040500050807 Content-Type: text/plain; name="gdb_download_speed.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdb_download_speed.patch" Content-length: 826 --- symfile.c.orig 2006-08-31 15:29:12.000000000 +0200 +++ symfile.c 2006-08-31 15:47:28.000000000 +0200 @@ -1769,14 +1769,14 @@ ui_out_text (uiout, "Transfer rate: "); if (time_count > 0) { - ui_out_field_fmt (uiout, "transfer-rate", "%lu", - 1000 * (data_count * 8) / time_count); - ui_out_text (uiout, " bits/sec"); + ui_out_field_fmt (uiout, "transfer-rate", "%lu", + (unsigned long)((((unsigned long long)data_count)*1000)/time_count)/1024); + ui_out_text (uiout, " Kbytes/sec"); } else { - ui_out_field_fmt (uiout, "transferred-bits", "%lu", (data_count * 8)); - ui_out_text (uiout, " bits in <1 sec"); + ui_out_field_fmt (uiout, "transferred-bits", "%lu", data_count); + ui_out_text (uiout, " bytes in <1 sec"); } if (write_count > 0) { --------------080606050903040500050807--