From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PATCHv10 1/5] gdb: more 'const' in the multi-so-lib progspace code
Date: Thu, 29 Oct 2026 10:20:47 +0000 [thread overview]
Message-ID: <d4d92f4d46ef96803006908849733143248e734a.1793268860.git.aburgess@redhat.com> (raw)
In-Reply-To: <cover.1793268860.git.aburgess@redhat.com>
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_up> &solib_ops ()
+ const std::vector<solib_ops_up> &solib_ops () const
{ return m_solib_ops; }
/* Find an solib_ops instance of type SOLIB_OPS_TYPE.
Return nullptr if not found. */
template <typename solib_ops_type>
- 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<solib_ops_type *> (ops.get ());
--
2.25.4
next prev parent reply other threads:[~2026-10-29 10:21 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 18:14 [PATCH] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-06-11 19:24 ` Guinevere Larsen
2026-06-11 20:40 ` Andrew Burgess
2026-06-12 12:49 ` Guinevere Larsen
2026-06-11 21:59 ` [PATCHv2 0/3] " Andrew Burgess
2026-06-11 21:59 ` [PATCHv2 1/3] gdb: rename program_space::entry_point_address* functions Andrew Burgess
2026-06-12 15:41 ` Pedro Alves
2026-06-11 21:59 ` [PATCHv2 2/3] gdb: introduce program_space::get_entry_point_info function Andrew Burgess
2026-06-12 6:07 ` Eli Zaretskii
2026-06-15 10:14 ` Andrew Burgess
2026-06-15 12:01 ` Eli Zaretskii
2026-06-12 15:41 ` Pedro Alves
2026-06-15 10:29 ` Andrew Burgess
2026-06-16 18:36 ` Pedro Alves
2026-06-23 9:46 ` Andrew Burgess
2026-06-23 10:20 ` Pedro Alves
2026-06-11 21:59 ` [PATCHv2 3/3] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-06-12 15:57 ` Pedro Alves
2026-06-16 19:47 ` [PATCHv3 0/4] " Andrew Burgess
2026-06-16 19:47 ` [PATCHv3 1/4] gdb: rename program_space::entry_point_address* functions Andrew Burgess
2026-06-16 19:47 ` [PATCHv3 2/4] gdb: introduce program_space::get_entry_point_info function Andrew Burgess
2026-06-17 11:52 ` Eli Zaretskii
2026-06-16 19:47 ` [PATCHv3 3/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-06-16 19:47 ` [PATCHv3 4/4] gdb: cache program space entry point information Andrew Burgess
2026-06-23 10:47 ` [PATCHv4 0/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-06-23 10:47 ` [PATCHv4 1/4] gdb: rename program_space::entry_point_address* functions Andrew Burgess
2026-06-23 10:47 ` [PATCHv4 2/4] gdb: introduce program_space::get_entry_point_info function Andrew Burgess
2026-06-23 10:47 ` [PATCHv4 3/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-06-23 10:47 ` [PATCHv4 4/4] gdb: cache program space entry point information Andrew Burgess
2026-06-25 15:26 ` [PATCHv5 0/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-06-25 15:26 ` [PATCHv5 1/4] gdb: rename program_space::entry_point_address* functions Andrew Burgess
2026-06-25 15:26 ` [PATCHv5 2/4] gdb: introduce program_space::get_entry_point_info function Andrew Burgess
2026-06-25 15:26 ` [PATCHv5 3/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-06-25 15:26 ` [PATCHv5 4/4] gdb: cache program space entry point information Andrew Burgess
2026-07-10 14:24 ` [PATCHv6 0/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-07-10 14:24 ` [PATCHv6 1/4] gdb: rename program_space::entry_point_address* functions Andrew Burgess
2026-07-10 14:24 ` [PATCHv6 2/4] gdb: introduce program_space::get_entry_point_info function Andrew Burgess
2026-07-10 15:39 ` Simon Marchi
2026-07-10 14:24 ` [PATCHv6 3/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-07-10 17:00 ` Simon Marchi
2026-07-10 17:01 ` Simon Marchi
2026-07-16 15:06 ` Andrew Burgess
2026-07-10 14:24 ` [PATCHv6 4/4] gdb: cache program space entry point information Andrew Burgess
2026-07-10 17:07 ` Simon Marchi
2026-07-18 13:11 ` [PATCHv7 0/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-07-18 13:11 ` [PATCHv7 1/4] gdb: rename program_space::entry_point_address* functions Andrew Burgess
2026-07-18 13:11 ` [PATCHv7 2/4] gdb: introduce program_space::get_entry_point_info function Andrew Burgess
2026-07-18 13:11 ` [PATCHv7 3/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-07-18 13:11 ` [PATCHv7 4/4] gdb: cache program space entry point information Andrew Burgess
2026-07-20 9:52 ` [PATCHv8 0/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-07-20 9:52 ` [PATCHv8 1/4] gdb: rename program_space::entry_point_address* functions Andrew Burgess
2026-07-20 9:52 ` [PATCHv8 2/4] gdb: introduce program_space::get_entry_point_info function Andrew Burgess
2026-08-12 15:44 ` Simon Marchi
2026-07-20 9:52 ` [PATCHv8 3/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-08-12 17:53 ` Simon Marchi
2026-08-20 10:32 ` Andrew Burgess
2026-07-20 9:52 ` [PATCHv8 4/4] gdb: cache program space entry point information Andrew Burgess
2026-08-24 16:22 ` [PATCHv9 0/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-08-24 16:22 ` [PATCHv9 1/4] gdb: rename program_space::entry_point_address* functions Andrew Burgess
2026-08-24 16:22 ` [PATCHv9 2/4] gdb: introduce program_space::get_entry_point_info function Andrew Burgess
2026-08-24 16:22 ` [PATCHv9 3/4] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-10-27 14:33 ` Simon Marchi
2026-08-24 16:22 ` [PATCHv9 4/4] gdb: cache program space entry point information Andrew Burgess
2026-10-29 10:20 ` [PATCHv10 0/5] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-10-29 10:20 ` Andrew Burgess [this message]
2026-10-29 10:20 ` [PATCHv10 2/5] gdb: rename program_space::entry_point_address* functions Andrew Burgess
2026-10-29 10:20 ` [PATCHv10 3/5] gdb: introduce program_space::get_entry_point_info function Andrew Burgess
2026-10-29 10:20 ` [PATCHv10 4/5] gdb: allow 'until' to work in outermost frame Andrew Burgess
2026-10-29 10:20 ` [PATCHv10 5/5] gdb: cache program space entry point information Andrew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d4d92f4d46ef96803006908849733143248e734a.1793268860.git.aburgess@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox