Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Pedro Alves <pedro@palves.net>,
	Simon Marchi <simon.marchi@efficios.com>,
	 gdb-patches@sourceware.org
Subject: Re: [PATCH v3 5/6] gdb/progspace: add solib_ops pointer in program_space
Date: Thu, 26 Jun 2025 13:37:33 -0400	[thread overview]
Message-ID: <d81c3c4a-cb41-4cca-8b5c-3640dbed103d@simark.ca> (raw)
In-Reply-To: <99a1325c-d9f6-4862-aacb-16f3433ccede@palves.net>



On 2025-06-20 14:19, Pedro Alves wrote:
> On 2025-06-16 20:33, Simon Marchi wrote:
>> New in v3:
>>
>>  - add some ops nullptr checks in print_solib_list_table and
>>    info_linker_namespace_command
>>
>> The subsequent C++ification patch in this series will allocate one
>> instance of solib_ops per program space.  That instance will be held in
>> struct program_space.  As a small step towards this, add an `solib_ops
>> *` field to `struct program_space`.  This field represents the solib_ops
>> currently used to manage the solibs in that program space.  Initialize
>> it with the result of `gdbarch_so_ops` in `post_create_inferior`, and
>> use it whenever we need to do some solib stuff, rather than using
>> `gdbarch_so_ops` directly.
>>
>> The difficulty here is knowing when exactly to set and unset the solib
>> ops.  What I have here passes the testsuite on Linux, but with more
>> testing we will probably discover more spots where it's needed.
> 
> One important detail is keeping the solibs listed after the inferior exits.
> This is so the user can set breakpoints in shared library symbols for the
> next re-run.
> 
> Your patches preserve that, which is good.  I don't recall off hand if there's
> a testcase ensure it.
> 
> Tiny nit below.  Other than that:
> 
> Approved-By: Pedro Alves <pedro@palves.net>
> 
>> diff --git a/gdb/progspace.h b/gdb/progspace.h
>> index 5e5d5edd9b4b..abb448195d74 100644
>> --- a/gdb/progspace.h
>> +++ b/gdb/progspace.h
>> @@ -231,6 +231,23 @@ struct program_space
>>       is outside all objfiles in this progspace.  */
>>    struct objfile *objfile_for_address (CORE_ADDR address);
>>  
>> +  /* Set this program space's solib provider.
>> +
>> +     The solib provider must be unset prior to call this method.  */
> 
> 
> "prior to call" -> prior to calling"

Thanks, fixed.

Simon

  reply	other threads:[~2025-06-26 17:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16 19:32 [PATCH v3 1/6] gdb/testsuite: check that "info shared" and "info linker-namespaces" before running don't crash Simon Marchi
2025-06-16 19:33 ` [PATCH v3 2/6] gdb/solib: fix formatting of "info linker-namespaces" error message Simon Marchi
2025-06-20 18:12   ` Pedro Alves
2025-06-26 17:35     ` Simon Marchi
2025-06-16 19:33 ` [PATCH v3 3/6] gdb/solib: add solib -> solib_ops backlink Simon Marchi
2025-06-20 18:17   ` Pedro Alves
2025-06-16 19:33 ` [PATCH v3 4/6] gdb/solib: use solib::ops for operations that concern a single solib Simon Marchi
2025-06-20 18:17   ` Pedro Alves
2025-06-16 19:33 ` [PATCH v3 5/6] gdb/progspace: add solib_ops pointer in program_space Simon Marchi
2025-06-17 19:45   ` Guinevere Larsen
2025-06-17 20:33     ` Simon Marchi
2025-06-18 11:51       ` Guinevere Larsen
2025-06-18 14:43         ` Simon Marchi
2025-06-18 15:01           ` Guinevere Larsen
2025-06-20 18:19   ` Pedro Alves
2025-06-26 17:37     ` Simon Marchi [this message]
2025-09-02 14:49   ` Tom de Vries
2025-09-02 16:05     ` Simon Marchi
2025-09-02 16:34       ` Tom de Vries
2025-06-16 19:33 ` [PATCH v3 6/6] gdb/solib: C++ify solib_ops Simon Marchi
2025-06-20 18:20   ` Pedro Alves
2025-06-26 18:04     ` Simon Marchi
2025-06-27 22:04       ` Tom de Vries
2025-06-27 22:46         ` Thiago Jung Bauermann
2025-06-28  5:25           ` Simon Marchi
2025-06-28  6:27             ` Tom de Vries
2025-06-20 18:12 ` [PATCH v3 1/6] gdb/testsuite: check that "info shared" and "info linker-namespaces" before running don't crash Pedro Alves
2025-06-26 17:30   ` Simon Marchi

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=d81c3c4a-cb41-4cca-8b5c-3640dbed103d@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    --cc=simon.marchi@efficios.com \
    /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