From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org, Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH v2] gdb: fix owner passed to remove_target_sections in clear_solib
Date: Fri, 20 Oct 2023 11:29:25 -0600 [thread overview]
Message-ID: <87fs25p5hm.fsf@tromey.com> (raw)
In-Reply-To: <20231020033231.1261222-1-simon.marchi@polymtl.ca> (Simon Marchi's message of "Thu, 19 Oct 2023 23:31:19 -0400")
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
Simon> Fix that, but try to make things less error prone. Make the current
Simon> add_target_sections and remove_target_sections methods of program_space
Simon> private, and add wrappers that are typed, with the types we expect
Simon> (bfd *, objfile *, so_list *). Perhaps there is a more elegant way to
Simon> do this, but I think that this is already better / safer than what we
Simon> have, as it would have caught my mistake.
Thank you for doing this. I think the approach you've taken is a good
improvement over the status quo.
IIRC I wrote the current code back in the C days, when overloading was
more of a pain.
Simon> - Rename private methods (suffix with `_1`) to avoid using them by
Simon> mistake
C++ doesn't mean freedom from the _1 stuff :)
But it seems fine anyway, it's a private method.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
next prev parent reply other threads:[~2023-10-20 17:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 3:31 Simon Marchi
2023-10-20 17:29 ` Tom Tromey [this message]
2023-10-20 17:40 ` Pedro Alves
2023-10-20 18:59 ` 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=87fs25p5hm.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
--cc=simon.marchi@polymtl.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).