From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id C83673858D39 for ; Tue, 28 Feb 2023 14:24:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C83673858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x135.google.com with SMTP id b16so6370252iln.3 for ; Tue, 28 Feb 2023 06:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iE5dKgyqj12rRraCFPP6K++YZ2mWcr+JeimsPYn14jI=; b=j5boHtvCC24y+K0KmWqpZMlwLJ/GaFPJ3E/pE3egsFQUxS5l+Nmfo5KeXkp2j9GLMU H/MBkvgqakgGqefrvIDa2o/EYzFQeascvVDWwzycOM3BK4+OspDE24VOeNXNTvr2PbWy WW9wRePZ9cbczQ6T98JkxTLYwVMun+zmJbIpD0OjEVxIjXiDETnAYroLeQyDNH8zHv0b 2ztfaVFxPJssgTkqncBDs3wbSIP2xM4niJnUf10zdW5qVVWycjzmqK5R0NkTe9wRQiHC Mbf8UOAcAS9UEM5frNox5MtJmfNkSi6brMJj8PUIqEapcAxaGf8khhxMsTxsJ5SHJPkh yK6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iE5dKgyqj12rRraCFPP6K++YZ2mWcr+JeimsPYn14jI=; b=R+AXW2cDiQj8Q9nMFwuz0YgCqazKQ5O5gmJC90juW6+jUwtDFgvbnQk3A7u8K7ZTVt AEA/MFSgDQvgA4DYS/cuAMCKJ+wFVDJ+gxBmXgHE0uhm8wCzQtdmdQxaBftfphygz/ua fGx4dpmKB3uMPcCjpYYWPCwYb5b9QRZjZbtLN+dZUB/dlH+KLDMkJYf/+PUsQ/9BBUy+ C3cqC5yZDz12RYYlhuI3leTAcCNmjgQge4ztLpg5mzht0aOwdm8jyUsUj1SU2ufmxv+2 plR8B8ibNlDdIhhcKyQvMlXTdPvYHt0UpXXB9bTIOHmvmbwtsvEKH8K6foYis5OU+c9A H+3Q== X-Gm-Message-State: AO0yUKVX29nuTHOkNqnu6i3KfzwOfTKe3aR+E5HuopRI3Px9OJF4uMwm LKhaMQZwgwnUUHCqvpRal93X/K2DiSG+zUFR X-Google-Smtp-Source: AK7set82aiblya71V4mKGn11HsOOpmRnmj3K1Ul4MTQ4rd1nA8k3JUT9D1sTuvrc6XSrdLHVjmQ7RA== X-Received: by 2002:a05:6e02:1a49:b0:314:5aa:94b6 with SMTP id u9-20020a056e021a4900b0031405aa94b6mr2842975ilv.24.1677594257927; Tue, 28 Feb 2023 06:24:17 -0800 (PST) Received: from localhost.localdomain (75-166-130-93.hlrn.qwest.net. [75.166.130.93]) by smtp.gmail.com with ESMTPSA id r10-20020a02c6ca000000b003acde48bdc3sm2877642jan.111.2023.02.28.06.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 06:24:17 -0800 (PST) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [pushed] Remove value_in Date: Tue, 28 Feb 2023 07:24:10 -0700 Message-Id: <20230228142410.2875314-1-tromey@adacore.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.6 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: value_in is unused. From git log, it seems to have been part of the Chill language, which was removed from gdb eons ago. This patch removes the function. Tested by rebuilding. --- gdb/valarith.c | 23 ----------------------- gdb/value.h | 2 -- 2 files changed, 25 deletions(-) diff --git a/gdb/valarith.c b/gdb/valarith.c index a6a5f5102a2..070ee63808e 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -2020,26 +2020,3 @@ value_bit_index (struct type *type, const gdb_byte *valaddr, int index) rel_index = TARGET_CHAR_BIT - 1 - rel_index; return (word >> rel_index) & 1; } - -int -value_in (struct value *element, struct value *set) -{ - int member; - struct type *settype = check_typedef (set->type ()); - struct type *eltype = check_typedef (element->type ()); - - if (eltype->code () == TYPE_CODE_RANGE) - eltype = eltype->target_type (); - if (settype->code () != TYPE_CODE_SET) - error (_("Second argument of 'IN' has wrong type")); - if (eltype->code () != TYPE_CODE_INT - && eltype->code () != TYPE_CODE_CHAR - && eltype->code () != TYPE_CODE_ENUM - && eltype->code () != TYPE_CODE_BOOL) - error (_("First argument of 'IN' has wrong type")); - member = value_bit_index (settype, set->contents ().data (), - value_as_long (element)); - if (member < 0) - error (_("First argument of 'IN' not in range")); - return member; -} diff --git a/gdb/value.h b/gdb/value.h index f2a4907ab81..c3eb96bf143 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1270,8 +1270,6 @@ extern struct value *value_bitstring_subscript (struct type *type, extern struct value *register_value_being_returned (struct type *valtype, struct regcache *retbuf); -extern int value_in (struct value *element, struct value *set); - extern int value_bit_index (struct type *type, const gdb_byte *addr, int index); -- 2.39.1