From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by sourceware.org (Postfix) with ESMTPS id CD2743851AA9 for ; Mon, 13 Jun 2022 14:36:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CD2743851AA9 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f43.google.com with SMTP id x17so7404428wrg.6 for ; Mon, 13 Jun 2022 07:36:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=NFsTOz1p9/Gyl1mSGXARRIJQTGvWU3m26+D/8XlIPNk=; b=JdoI2tP6u5NWMPYOK90ov1qLOXKxZSReA1tp4Ikxm+ufRXAaNpDLz4Q9wce10H4JXT ghrOvm1OhGGrx9IJ/S1FlaJuPEr9AaiigMHCvPzXwlaMwjenuDXFDvtAgTdW+/aSESZi /KBSYeO0kK668F02iMbOMmV8lkjH0x2J41enP47WDxYdxojOl2S/owgaA4CW5e2Mt+A9 4VuXOJWUoGjHxIAGIx6GIiXs4LDtGypkxgfrLzP/iBUKuEgAjvHaKP05w8qJtmOOVRQU XCEfEbVifj8vNCeJPfbVD6ln8tKx717kW5UuEWq1wjnaFixLLysOMmb2hTJ5jJL+l91Y 503Q== X-Gm-Message-State: AJIora9tVsjW64HKNs3cKjIgXUYCHrCwe5FqFFAC8Goy8mnNIr8wyJhm vQ7YwfKiCeR8J6Hwgzp83U4ptFlGrJc= X-Google-Smtp-Source: AGRyM1sXCyp3xgzdmuuZfXnQH+EdVwtK5Kv05RbCulaNuueMyJx563KdbkG/D4vpCY94DSmX02s22w== X-Received: by 2002:a05:6000:1541:b0:219:c470:186c with SMTP id 1-20020a056000154100b00219c470186cmr205773wry.34.1655131014540; Mon, 13 Jun 2022 07:36:54 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id g21-20020a1c4e15000000b0039c45fc58c4sm9536049wmh.21.2022.06.13.07.36.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jun 2022 07:36:53 -0700 (PDT) Message-ID: <0771089e-1094-938a-5b67-191cb8156322@palves.net> Date: Mon, 13 Jun 2022 15:36:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 2/3] Change location_to_sals to a method Content-Language: en-US To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20220528024231.474534-1-tom@tromey.com> <20220528024231.474534-3-tom@tromey.com> <87a6ax6l75.fsf@tromey.com> <321dffd0-2c41-7c78-a24f-a920ff30afd6@palves.net> <87ilp819u1.fsf@tromey.com> From: Pedro Alves In-Reply-To: <87ilp819u1.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Mon, 13 Jun 2022 14:36:57 -0000 On 2022-06-10 22:34, Tom Tromey wrote: > Pedro> Maybe we could give -Wshadow another try. > > I looked into this. I got pretty far along, and it wouldn't be too hard > to finish. However, GCC does issue complaints about some conflicts that > don't and probably wouldn't ever find real bugs. > > As simple example is that the 'gdbarch_tdep' function conflicts with > 'struct gdbarch_tdep' (or maybe with its purported constructor). There > are a surprising number of these because it's common to give the same > name to a frame cache struct and corresponding unwinding function. Ouch. :-/ I guess this may run into "struct gdbarch *gdbarch" issues too, if struct gdbarch ever gained a constructor? > > Anyway, I can finish the series if you think it's worthwhile. Not really sure. > I started hacking up a compiler patch instead but TBH I doubt I'll > finish that. The compiler idea seemed promising to me. Maybe someone else picks it up.