From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 82649385780F for ; Fri, 15 Oct 2021 15:39:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82649385780F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x42e.google.com with SMTP id u18so27325397wrg.5 for ; Fri, 15 Oct 2021 08:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=57gGBmC1xi7va4XN0OzcHIb0/NL3EZUKICF4q7/hjd4=; b=d7zzFleRcfesnAimcv49481TUxmqCVQLcNP1WgmcpDPF2DHxjoliMbOgkrJlFEhZi5 KVTnM2HcI3tgG7i99NB3JnWlUb38GHKI5oO5eHQqXMgoBtNjMUFRWPFdqNiwG1d/uq5I /iXGejrIk43VUhcQUW9cOIRG+ixudjSTXJ4jRlZOdyUhSkcQFNfugT/cKUnKUS4WthhS HPr74OfkL676OJxf9bC4WfgWP/QqWRNZ0ST5q2m5Thw+HkHmx0IGAbq6t1SQ8ySW5vsQ VfNiFwNzVETplOktR/fnvvLLnX/LVIROjCbSniMYuDJTWSt+9+lGWMIkm5jxmBDFdZyA gW8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=57gGBmC1xi7va4XN0OzcHIb0/NL3EZUKICF4q7/hjd4=; b=k+OYpQtsu2oP6GOjCK3vrBGbyEZ5D7XWeBQ8roPPLQDgVzo+YvBYwMDlwH7Nu7ur0O UlZF+HFRbn+q118L32PsbF8/r5UJE+eYAVT5L+aebgHn4+PJA29Sy/biqvZolbU8m5Zp x9cEgIYOd+z3n4wvF+ctQgy7CsWrwZZLYgKrQwfI2H7IVi0VsfafuSnHvr0Nlfs0FJno WTTrFycHJLi1ACUKkaoXLX22t+hDzdIe2ARYkxbGSzoaJhL6ZrtkdrWGERTFKF6oiKyv ccjENUMi/rO4CQrfNda1fkbC0ccjDl57TkxadcwtsTcszUcB6A+KWpUKuS6T5V8dT+mr tFpg== X-Gm-Message-State: AOAM533uqvfZQryqkJgTEs/4K64Kz4PcjzYs075MdC83UooBp0S8lbdV wL38N0SjjTzS41RACuLmLDv/VXY56RA= X-Google-Smtp-Source: ABdhPJxLHHHCCAjGunL30OYjL95O725fjirYMjV6PDcoSq5mtNFQODNTQCfHbNp3D8ncQ/3KVIoyxg== X-Received: by 2002:adf:9c02:: with SMTP id f2mr15523957wrc.201.1634312355408; Fri, 15 Oct 2021 08:39:15 -0700 (PDT) Received: from localhost (host212-140-123-151.range212-140.btcentralplus.com. [212.140.123.151]) by smtp.gmail.com with ESMTPSA id t21sm4847676wmi.19.2021.10.15.08.39.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 08:39:15 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PATCH 1/2] gdb: make value_subscripted_rvalue static Date: Fri, 15 Oct 2021 16:39:06 +0100 Message-Id: <1ed4806735ae28246d998ec077b7330e74f830a6.1634312255.git.andrew.burgess@embecosm.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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, 15 Oct 2021 15:39:17 -0000 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