From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8QFPCjge42pbuAYAWB0awg (envelope-from ) for ; Thu, 29 Oct 2026 06:21:44 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=epC+0P4z; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2483B378002; Thu, 29 Oct 2026 06:21:44 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6EBF01E023 for ; Thu, 29 Oct 2026 06:21:43 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 971964BA23F0 for ; Thu, 29 Oct 2026 10:21:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 971964BA23F0 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=epC+0P4z Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 3E1A74BA2E30 for ; Thu, 29 Oct 2026 10:21:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3E1A74BA2E30 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3E1A74BA2E30 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793269264; cv=none; b=qOjv9B0/0FP/LmAMvyhiibnT9ZVCm5wh34Hg7LAplKOH+8qXSOwIeMKZtaRLssjaJtssIB4XWjlOIYqqi2Cw0Ju7LFslhHL5nZMYABsEA8NuVa16jnD3nph+JxqaU2xv4xsUt4DibDym7Rl8ey3YyJ23sez5InIEeXNzijVxRlw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793269264; c=relaxed/simple; bh=lHq87P1PtkE+3Wjq7h4L112wCSFIT8+5Mf5pYHCfpBM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=NhJhzfo8RN0vSnDt1VKt82wB8aJDlo88eUA+pZ5pfHu3hsCJGOaEucZJx+OerDN0oCyCSAex8+RhYQU6g/gdKMeCAvMY0oBsN0+Lr/dKLLdcVj5I54kH8GeVrHkWCbdzk14ckE/DHhojkeh4/DNYUZz7+yggbR7EhUveViDzQvE= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=epC+0P4z DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E1A74BA2E30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793269263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iihlygN8cu4Fx/G0B09FAO9F1/94Jx1458Ov/o/xFGA=; b=epC+0P4zqcwjsIMUgajTIVr/8r6FYskogt2qNQmj6RSv+ddX/VzW0S2+lcWyt2qvFjW9Qs GeUMeSrW1gc5EbOGEV6TAK9xBuu1AfPw9WZTcjycc+e6TBXiLeN780SwhEKcEDs3Hkw3kR jrK3DgJ3AHIZu79Mh5rrbG2ibyAUymc= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-3TRGKPAWNwuWI8qDf55tSg-1; Thu, 29 Oct 2026 06:21:00 -0400 X-MC-Unique: 3TRGKPAWNwuWI8qDf55tSg-1 X-Mimecast-MFC-AGG-ID: 3TRGKPAWNwuWI8qDf55tSg_1793269259 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-48b0a199b20so1530507f8f.1 for ; Thu, 29 Oct 2026 03:21:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793269259; x=1793874059; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=iihlygN8cu4Fx/G0B09FAO9F1/94Jx1458Ov/o/xFGA=; b=rBbfTNyi2PFqCIuItAi1GjhSUaz5WlbuDq9EQ8KwtuNnTUuYnvXqCBQMySingZVkhA kOv0MVJxwxqR/IGu7ZeTUCkhc0IzPq3uxw0DGJjWKi2tzuhcW3EFbzE0RpqqzkghtL4X eBjbpFbre/SrmSLu0YYEnJeb8foPTQDzIMzAa/rRFKea5Oy2jPzqE038NWBfeB1M5ywa qES2BL/Y9FU1P35DwuQDwpkn/hPq5rlfmg2UEXqUYx4luOVJI0iDYvdm6AXMXq9YGs0U zRUZav6TllBo3t5X+664eKtNZew84vg5eFZauDNDM+s5LhCQkpaM66Fgp7Ovb2ImkY4e vcnA== X-Gm-Message-State: AFq9FYLykgCuLGxf0xcu2BuX8tD39UCwVAyRsLoNB9tp9LhzBFnVFg4e gce4rMXPKatRDa+T1O/smgitFSGs6m1zId2xanmKRNTotbAxEzKjCPdoOOJXipHWOS5Ykx4Zayq Lc06FWjyWr3K42osdEs5UXaik4jv8iOe80wjgeLmqyQX8RxMLNee6dI6X3cIDjo3Rn3hMNsE2Sb MbIJRNa0FBwx/QeBtdxKbCe+Dc0/4E6ZEOvbWw087DDCXxDb0= X-Gm-Gg: AYBFou3I6SQpuD5hodKkgqqPnBevEvVqakiKZDDlXlH420wYoJM2yWZw3HV6StKQaGo ZiSVJhqU7hFSZ7FyfMkPYjiLb09nMcD9p3kSchCUvS4kuB7H3WC3cjZUiUOv99fpqbpuGP+DsR2 vAqFZUpzpF1sz/0ml4RcyGrwdN0Au68nLA0MaqO/owMtk1pNSmUF6VAPYn+iq6EdhkojyFUAxd5 8lZ2rYv5xfUUx1lFCP4fZOfsHN/08ttu6GrD/4JxHaMGpMkstIEKdjO3Q7hSGyxvHBS4xmQ9Jv3 s2wQKX0lXoab/Fa7M1D/ZfN21Mzm2UNkU35YnQD8GDMqYfixMMiZvsYnuA+NLnA/NV166cgeV80 gIo3KtsVBI+LYbgexVuYa6JMXKg273roHOx4oAvr0ccSpxGEb X-Received: by 2002:a5d:4a8a:0:b0:487:27f9:840 with SMTP id ffacd0b85a97d-48e5d30f7e8mr9300363f8f.53.1793269259418; Thu, 29 Oct 2026 03:20:59 -0700 (PDT) X-Received: by 2002:a5d:4a8a:0:b0:487:27f9:840 with SMTP id ffacd0b85a97d-48e5d30f7e8mr9300303f8f.53.1793269258811; Thu, 29 Oct 2026 03:20:58 -0700 (PDT) Received: from localhost ([2a00:23c6:e11d:fb01:6748:4fce:3e30:6e23]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3eb40733sm26303833f8f.0.2026.10.29.03.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2026 03:20:58 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv10 1/5] gdb: more 'const' in the multi-so-lib progspace code Date: Thu, 29 Oct 2026 10:20:47 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: epXyRL1JmqYEW_FPU4OYho4xA6TfKLFYthAx5uIwQYs_1793269259 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org This is a small tweak to some of the code added in commit: commit 822c4cd732ce0b6a76f5b4c3317f6aaa5dca09c6 Date: Fri Aug 7 09:52:28 2026 -0400 gdb: multiple solib_ops per program space that makes some of the new methods more 'const'. There are two methods that I change here program_space::solib_ops and program_space::find_solib_ops. A later commit in this series needs to call the solib_ops method from a const member function. I initially added a solib_ops overload that was const, but then I realised none of the existing users actually need the method to be non-const, so I figure lets just make the existing method const, and we can add a non-const overload later, when there's an actual need. For find_solib_ops this was me just looking at the 822c4cd732ce0b6a commit again and spotting that this method could also be const. This change isn't needed by any of my follow on commits, so this part could be dropped if there's push back. There should be no user visible changes after this commit. --- gdb/progspace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/progspace.h b/gdb/progspace.h index a5ef3deb337..513f5c157b6 100644 --- a/gdb/progspace.h +++ b/gdb/progspace.h @@ -271,14 +271,14 @@ struct program_space void remove_solib_ops (const solib_ops &ops); /* Return a view of the solib providers for this program space. */ - std::vector &solib_ops () + const std::vector &solib_ops () const { return m_solib_ops; } /* Find an solib_ops instance of type SOLIB_OPS_TYPE. Return nullptr if not found. */ template - solib_ops_type *find_solib_ops () + const solib_ops_type *find_solib_ops () const { for (auto &ops : this->solib_ops ()) if (auto ret = dynamic_cast (ops.get ()); -- 2.25.4