From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SFWeHsQ/1GNGEiMAWB0awg (envelope-from ) for ; Fri, 27 Jan 2023 16:19:00 -0500 Received: by simark.ca (Postfix, from userid 112) id 789221E128; Fri, 27 Jan 2023 16:19:00 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=O1HslC7n; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 310571E0D3 for ; Fri, 27 Jan 2023 16:19:00 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6EE893858C54 for ; Fri, 27 Jan 2023 21:18:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6EE893858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674854338; bh=Pc5dt2/twVimo0unuEHuy6IpS1ygmCodSrDsI0FgWlY=; h=To:Cc:Subject:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=O1HslC7nM2AvwCqScF4aS2X253eMtSK0OEluubjK79Wlya+kW20Sj7uC2sbfb4t3j UO3ES4GlhTAm1h4J6+HjAKC9IAEdYVR1plPWwOCUw9gMLiTb5o5ZOYm/fWCZCp3u7V 0g2r5W7WvfWSCMsXHg0MPzdpZxVqLmuEnB2F5qsU= Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by sourceware.org (Postfix) with ESMTPS id 489283858D20 for ; Fri, 27 Jan 2023 21:18:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 489283858D20 Received: by mail-io1-xd32.google.com with SMTP id s26so2406126ioa.11 for ; Fri, 27 Jan 2023 13:18:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Pc5dt2/twVimo0unuEHuy6IpS1ygmCodSrDsI0FgWlY=; b=bES0e5zr5+/huKFAP9l2IBfrDYf0RzfeCiAuR2lQW4JbfrZy9xKhO+yONgsHmFcqYt cnzZP1CfJFViJm1fcyfZaimUtToqOHtmUlqISsfiklC+6i0HpVeBe7IcSl316iRN/KuX +ArWxPXu9HqUTJ/l9fY6E7GRjqNL1hFyxzZ6gdN5iVh7W/uuIDCStco5A/CKr4AO4Zu4 CT8DgFm8B42xEBpwf1rtxg4DrRNe87bhoHHbuXT52oOjujA5xV9VvSBPHwAMC3GrHFDX IBBPII38CP0pKCrE7WkITxpCGdfBryidr+d/xH367jZZYyK4zlT5QFYUckbcTppctqy4 qs5A== X-Gm-Message-State: AFqh2kpzHQX8W6/Bj9s+Mj87D7VySye83BVKLNvGc6fQyy5MG0fIVo1k qcPtIz5FO9WP9cnLNIbyEpAgWTSZCOZGBZtO X-Google-Smtp-Source: AMrXdXswJu7g5w82WW6zZFnwMNRsfqYwzxD/U1ilPUS9pbB7FwDQcakNu2YkP80//467YfaUNu/nkw== X-Received: by 2002:a05:6602:215a:b0:6d6:4daf:623f with SMTP id y26-20020a056602215a00b006d64daf623fmr25470452ioy.6.1674854316514; Fri, 27 Jan 2023 13:18:36 -0800 (PST) Received: from murgatroyd (75-166-146-144.hlrn.qwest.net. [75.166.146.144]) by smtp.gmail.com with ESMTPSA id i21-20020a02c615000000b0039e8f997ad6sm1850455jan.32.2023.01.27.13.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 13:18:35 -0800 (PST) To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Make addrmap const-correct in cooked index References: <20230127162603.4127820-1-tromey@adacore.com> <8446b53b-bd73-637b-7613-45c896d7240f@simark.ca> X-Attribution: Tom Date: Fri, 27 Jan 2023 14:18:35 -0700 In-Reply-To: <8446b53b-bd73-637b-7613-45c896d7240f@simark.ca> (Simon Marchi's message of "Fri, 27 Jan 2023 14:58:18 -0500") Message-ID: <87cz6zptg4.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , From: Tom Tromey via Gdb-patches Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" >>>>> "Simon" == Simon Marchi writes: Simon> -void * Simon> +const void * Simon> addrmap_fixed::find (CORE_ADDR addr) const Simon> { Simon> const struct addrmap_transition *bottom = &transitions[0]; Actually, this is going to rely on casting away const in some spots. For example cooked_index::lookup: dwarf2_per_cu_data *lookup (CORE_ADDR addr) const { return (dwarf2_per_cu_data *) m_addrmap->find (addr); } Probably we can't constify dwarf2_per_cu_data all over. Tom