From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by sourceware.org (Postfix) with ESMTPS id 392A73858D1E for ; Thu, 7 Sep 2023 14:00:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 392A73858D1E 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-io1-xd29.google.com with SMTP id ca18e2360f4ac-79536bc669dso41423839f.3 for ; Thu, 07 Sep 2023 07:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1694095244; x=1694700044; darn=sourceware.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=FbrT+BkClyc0IfPeKjFlEAsb/0JRyRPZTXEMWw9eFvk=; b=TdVkMC6J0hACyczkMhva7k9k2JRQeqR3JrrLVLvPSfIKSFUGs4wQvEdqYLpXBU2suO 59+NtmuJjGrJhxtvMbitoGXbdLtREFEp9xRgasVx3SH9jWInbdHXE7EXMHe9Uk2FBpw0 4m9ylSo2s28ke2+GKXP1SOB+4gknY3AeTAF7LSbZwc0+p+IXbCBaWcm/BdzoGkxZuBCf AFw6FrVzbsOaVeYkdR5EgApnh4fxrpg3sdfh0iTYIgQRq1ipFq4KIOCQX1602/dRsfVg 9tAai1WOYQs2Aoo/NIJqxnctg+TwrN1GCBQi6fODtw7V74W6nDw//MfH+WGvnTJIO4Sx W6rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694095244; x=1694700044; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FbrT+BkClyc0IfPeKjFlEAsb/0JRyRPZTXEMWw9eFvk=; b=Sh8rFqL2oX4R+FjjFKTE7korLmNtzMy/sqZ6YdU3+6GdcoF90G8XMoyTpdKxTyFnzx UTohDzYdr7JtnLRw5PL9rKlyXTmi6wGJkNlC6NG2oDK57sclNDTN61iRyngrnKMiDaE7 btOUECVLaT5mY3MPXaSPBqCzU7jQLn+kH77hII5F9Kh3lgMV/BooGMZp2wcC/HHQ8oez 6plYKm/JzM2QNLuTO9I3NBnjWimrmUQHlTueFSYSfmREMLL2A4Ew6BG+vJY6dZKApP+z P4l15jEgPyuH9UgiVM3BA/yHVZVPure9M9U42yW7GBH4KvAYYauxX/ozYXnBjmuArWUC WiPg== X-Gm-Message-State: AOJu0Yys1VGHS8oAS7AWA/fvNxXNbCTJ3OV0RN+3/yEwjaYHZ51+wGMQ q/IvZu9BBqz/RGBeb1oe3v07hZuxzUPTUcWGhP32Sg== X-Google-Smtp-Source: AGHT+IHtyjhuHWmPU+U1X5vRU4qS8OzPUb3DZjG5uLbqRU/WvC00ahcPBOO5lmTKKBgiFFMSqAGssg== X-Received: by 2002:a5e:db49:0:b0:791:1bd2:1d07 with SMTP id r9-20020a5edb49000000b007911bd21d07mr20970564iop.13.1694095244540; Thu, 07 Sep 2023 07:00:44 -0700 (PDT) Received: from murgatroyd (75-166-150-212.hlrn.qwest.net. [75.166.150.212]) by smtp.gmail.com with ESMTPSA id b19-20020a02c993000000b0042b5423f021sm5651347jap.54.2023.09.07.07.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 07:00:43 -0700 (PDT) From: Tom Tromey To: Tom de Vries via Gdb-patches Cc: Tom de Vries Subject: Re: [PATCH] [gdb/ada] Move identical enums handling later References: <20230906180121.31694-1-tdevries@suse.de> X-Attribution: Tom Date: Thu, 07 Sep 2023 08:00:43 -0600 In-Reply-To: <20230906180121.31694-1-tdevries@suse.de> (Tom de Vries via Gdb-patches's message of "Wed, 6 Sep 2023 20:01:21 +0200") Message-ID: <87ledim6b8.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: >>>>> "Tom" == Tom de Vries via Gdb-patches writes: Tom> The problem is here in remove_extra_symbols: Tom> ... Tom> if (symbols_are_identical_enums (syms)) Tom> syms.resize (1); Tom> ... Tom> where one of the two identical enums is picked before the enum_rep handling Tom> can resolve lit3 to one of the two. Tom> Fix this by moving the code to ada_resolve_variable. Thank you. It's hard to reason about this patch (like, maybe there could be some code path that now misses the de-duplication), but given that you tested it, I think it's ok. Approved-By: Tom Tromey Tom