From patchwork Fri Sep 13 01:31:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 34519 Received: (qmail 48350 invoked by alias); 13 Sep 2019 01:32:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 48332 invoked by uid 89); 13 Sep 2019 01:32:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2089, dear, kindly, officer X-HELO: mail-qt1-f193.google.com Received: from mail-qt1-f193.google.com (HELO mail-qt1-f193.google.com) (209.85.160.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Sep 2019 01:31:59 +0000 Received: by mail-qt1-f193.google.com with SMTP id j31so5174228qta.5 for ; Thu, 12 Sep 2019 18:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=POlmNdZiF4RNqmmUm1+Z45SxLsSIiYlCDVPluh3cco0=; b=b0aCus8t/huwpJBdw3Fn7pLlPzKsphIC2xcPce/ni/Wi5TjHEXLiRGikob0nmrycIs 2RQduLcHtfjouu7t/o4qnD+Lg7jmgXmpSMh5Loi5zY1VQ6guznLCxPuN567bHrZTV3XN Ampme8dBJ5a2+30bKpCBsWUG6gt53pUX5u0j3YRlfOsUOILNNfJsPb5deUXTVceIOsBc 9jp8ayJ+f4qEIdwzez7S3HzQH9RTJQJpGiDAps18Cg8oWj/QZr2KjnUbxo//6/aGtN3e zM+nZvN9URJJ1Vz3i/pgoAXFhLMO9AR864tYIcGayD967r3IqW3TgrPUFigP7/oDOP1k l42w== Return-Path: Received: from localhost ([207.253.95.5]) by smtp.gmail.com with ESMTPSA id o38sm11155919qtc.39.2019.09.12.18.31.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2019 18:31:56 -0700 (PDT) Date: Thu, 12 Sep 2019 21:31:55 -0400 From: Andrew Burgess To: gdb-patches@sourceware.org Subject: Re: Oh dear. I regret to inform you that commit aa17805fb9a3a1983a510ba425b682fba03410c2 might be unfortunate Message-ID: <20190913013155.GS6076@embecosm.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Fortune: 1 1 was a race-horse, 2 2 was 1 2. When 1 1 1 1 race, 2 2 1 1 2. X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes * gdb-buildbot@sergiodj.net [2019-09-12 21:04:31 -0400]: > My lords, ladies, gentlemen, members of the public. > > It is a matter of great regret and sadness to inform you that commit: > > gdb: Have 'maint info sections' print all sections again > aa17805fb9a3a1983a510ba425b682fba03410c2 > > might have made GDB unwell. Since I am just your Butler BuildBot, > I kindly ask that a human superior officer double-check this. > > Please note that if you are reading this message on gdb-patches, there might > be other builders broken. Apologies for causing this breakage. I have pushed the patch below which should resolve this issue. Thanks, Andrew --- commit ec6c8338a89b0ec022b66ed3efdd1577e6449d6d Author: Andrew Burgess Date: Thu Sep 12 21:23:37 2019 -0400 gdb: Force use of float version of log10 This commit: commit aa17805fb9a3a1983a510ba425b682fba03410c2 Date: Sat Aug 31 23:44:40 2019 +0100 gdb: Have 'maint info sections' print all sections again introduced a use of log10 that took an int as a parameter. Unfortunately this was causing a compilation error on Solaris, see: https://sourceware.org/ml/gdb-patches/2019-09/msg00230.html https://sourceware.org/ml/gdb-patches/2019-09/msg00231.html because there was only a float, double, or long double version of log10, and the compiler doesn't know which to choose. This commit should resolve this issue by casting the argument to float. gdb/ChangeLog: * maint.c (maint_print_section_data::maint_print_section_data): Force use of 'float log10 (float)' by casting the argument to float. diff --git a/gdb/maint.c b/gdb/maint.c index 286ec310135..1a621a17191 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -301,7 +301,7 @@ struct maint_print_section_data arg(arg) { int section_count = gdb_bfd_count_sections (abfd); - index_digits = ((int) log10 (section_count)) + 1; + index_digits = ((int) log10 ((float) section_count)) + 1; } private: