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 92587385841A for ; Fri, 3 Dec 2021 11:11:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 92587385841A Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-279-ZffJ4nRbNUaawKhLnYjY8A-1; Fri, 03 Dec 2021 06:11:24 -0500 X-MC-Unique: ZffJ4nRbNUaawKhLnYjY8A-1 Received: by mail-wm1-f69.google.com with SMTP id a85-20020a1c7f58000000b0033ddc0eacc8so3267237wmd.9 for ; Fri, 03 Dec 2021 03:11:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=H1aKCBa0UISONUmTNy3PBHhgnwp4DsCJ+h7hrOM6cdE=; b=ZlsFYaL63wKZzN+50/JynM9bx7j/RzdgmkoCNRB8vvATgE7QLU/pJlkq1Gdrd5wkk6 MolfmHXu3STSZ14KJW/IoElKmVT3pdDQRnHa7aABZuwlV6QZq5jaG/JDwfsvsRVs7SKb /6Ja0Z1iGYdUaTLUk4xqgP4GMdgiE8dy9ffg+l5KyIO1H7vk5IsZRjmj+kw2CZ4muVgz iTwcz0TtRSNrklOWItMoKtXc9IFi8feWd6qGIe4HY91PqOanH3sXK6VTe4x4Wk80e0ON Fns3cpNfnvSZCriom/CJupRKub4XdZSi8tcARw7FZdYRCYOF+HwnYlSU7m3uujRkVHt4 g2ng== X-Gm-Message-State: AOAM530i/J2bMWKMrj5bEoK+ntt/R41tdZDx9yRMZkzIqlmltU2/Il8k RZGbBmQJNR54lwzjkbzP3TChYjpsrRG9l9X2zCyaxAZQk+X70GsIoLlEH/ULCra2WAI1QEWXxZB Krg1TXvx72V/MucZzUGsUfg== X-Received: by 2002:a5d:6111:: with SMTP id v17mr21455288wrt.512.1638529883114; Fri, 03 Dec 2021 03:11:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwTPa8q00HNiSePgHOuXozHAY5CzW6OLE7o60n3aAN0hl7UkV5t8zzWgq11h2gpbwgQxxGHA== X-Received: by 2002:a5d:6111:: with SMTP id v17mr21455278wrt.512.1638529882952; Fri, 03 Dec 2021 03:11:22 -0800 (PST) Received: from localhost (host86-134-238-138.range86-134.btcentralplus.com. [86.134.238.138]) by smtp.gmail.com with ESMTPSA id t127sm4806821wma.9.2021.12.03.03.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 03:11:22 -0800 (PST) Date: Fri, 3 Dec 2021 11:11:20 +0000 From: Andrew Burgess To: Simon Marchi Cc: Andrew Burgess , gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] gdb: make value_subscripted_rvalue static Message-ID: <20211203111120.GP2662946@redhat.com> References: <1ed4806735ae28246d998ec077b7330e74f830a6.1634312255.git.andrew.burgess@embecosm.com> MIME-Version: 1.0 In-Reply-To: X-Operating-System: Linux/5.8.18-100.fc31.x86_64 (x86_64) X-Uptime: 11:10:58 up 14 days, 9 min, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Fri, 03 Dec 2021 11:11:27 -0000 * Simon Marchi [2021-10-15 11:42:26 -0400]: > On 2021-10-15 11:39 a.m., Andrew Burgess wrote: > > The function value_subscripted_rvalue is only used in valarith.c, so > > lets make it a static function. > > > > There should be no user visible change after this commit. > > --- > > gdb/valarith.c | 10 ++++++++-- > > gdb/value.h | 4 ---- > > 2 files changed, 8 insertions(+), 6 deletions(-) > > > > diff --git a/gdb/valarith.c b/gdb/valarith.c > > index 07472ef7c8a..0e204135bf2 100644 > > --- a/gdb/valarith.c > > +++ b/gdb/valarith.c > > @@ -29,6 +29,11 @@ > > #include "gdbsupport/byte-vector.h" > > #include "gdbarch.h" > > > > +/* Forward declarations. */ > > +static struct value *value_subscripted_rvalue (struct value *array, > > + LONGEST index, > > + LONGEST lowerbound); > > + > > /* Define whether or not the C operator '/' truncates towards zero for > > differently signed operands (truncation direction is undefined in C). */ > > > > @@ -190,8 +195,9 @@ value_subscript (struct value *array, LONGEST index) > > (eg, a vector register). This routine used to promote floats > > to doubles, but no longer does. */ > > > > -struct value * > > -value_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound) > > +static struct value * > > +value_subscripted_rvalue (struct value *array, LONGEST index, > > + LONGEST lowerbound) > > { > > struct type *array_type = check_typedef (value_type (array)); > > struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type)); > > diff --git a/gdb/value.h b/gdb/value.h > > index 45012372dbf..11c22ddf14f 100644 > > --- a/gdb/value.h > > +++ b/gdb/value.h > > @@ -1165,10 +1165,6 @@ extern struct value *find_function_in_inferior (const char *, > > > > extern struct value *value_allocate_space_in_inferior (int); > > > > -extern struct value *value_subscripted_rvalue (struct value *array, > > - LONGEST index, > > - LONGEST lowerbound); > > - > > /* User function handler. */ > > > > typedef struct value *(*internal_function_fn) (struct gdbarch *gdbarch, > > -- > > 2.25.4 > > > > > This one seems obvious to me. Thanks, I pushed this patch. Andrew