From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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-xd32.google.com with SMTP id s26so2406126ioa.11 for ; Fri, 27 Jan 2023 13:18:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; 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=Pc5dt2/twVimo0unuEHuy6IpS1ygmCodSrDsI0FgWlY=; b=HcpEeZga2BND2vn7V9pTxzfVrGytnn0WNsJJVsCZr6XHlC9CumZehTWyKWmVu+L50/ HUnn0iFNt925RXnf/zMzbABpy2EUoiTerFZpD1F/ygFGT1qZoRIqytfz9RJRRT00qIX4 HdQkQFWNA7y55bXAKLWchjodfqh/5bRXJ8AVR/RRZBlaaS5Hx6xb25k6HYaUAuz7VoxJ Fj1z0hwKqpzqZVE7fTidNxF1/c/ERsHOLmoHAG/frssDAv/r2OOY1nkJg1CSdwvQVbtt QRV9qWg6uZKVNz57S+JkfTU1sQaQkW3D+V/SHlWVWkqUWEf91vUaToxNjPaCAulYa5AD Ar/Q== 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) From: Tom Tromey 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-Spam-Status: No, score=-5.1 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: >>>>> "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