From: Simon Marchi <simark@simark.ca>
To: Andrew Burgess <aburgess@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb/remote: replace use of std::pair with an actual struct
Date: Sun, 12 Oct 2025 08:05:40 -0400 [thread overview]
Message-ID: <fe2ba50b-902b-4c0a-b8bd-d388ae98bd0a@simark.ca> (raw)
In-Reply-To: <87jz104hwc.fsf@redhat.com>
On 2025-10-12 04:57, Andrew Burgess wrote:
> Simon Marchi <simark@simark.ca> writes:
>
>> On 2025-10-11 09:34, Andrew Burgess wrote:
>>> Commit:
>>>
>>> commit 5edcbe2277db05b77ebf53f9c30b6c889a8729bc
>>> Date: Mon Jul 24 17:35:54 2023 +0100
>>>
>>> gdb: detect when gdbserver has no default executable set
>>>
>>> Introduced a use of std::pair as a data structure to hold some per
>>> program space information within the program space registry.
>>>
>>> It was pointed out during review of a later patch that the code would
>>> be easier to understand if the std::pair was replaced with a struct
>>> with named fields.
>>>
>>> That is what this commit does. Replace the std::pair with a struct,
>>> and update all accesses to use the named fields.
>>>
>>> There should be no user visible changes after this commit.
>>
>> Thanks, this LGTM.
>>
>> Approved-By: Simon Marchi <simon.marchi@efficios.com>
>>
>> I would just like to point out that if we ever add more fields to this
>> structure (this the remote target needs to record per-pspace), then it
>> would probably make sense to rename to to "remote_per_pspace" or
>> something like that, since it would no longer be only used to hold
>> remote exec information. But as of now, it's correct.
>
> Ask and you shall receive!
>
> The update below names the struct remote_per_progspace, and moves the
> exec file information into a nested struct.
>
> Is this better?
This looks clean to me, thanks.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Simon
next prev parent reply other threads:[~2025-10-12 12:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 15:07 [PATCH] gdb: use current executable for 'remote exec-file' in some cases Andrew Burgess
2025-10-06 15:43 ` Eli Zaretskii
2025-10-09 16:17 ` Simon Marchi
2025-10-11 13:34 ` [PATCH 0/2] Auto setting of 'remote exec-file' Andrew Burgess
2025-10-11 13:34 ` [PATCH 1/2] gdb/remote: replace use of std::pair with an actual struct Andrew Burgess
2025-10-11 13:46 ` Simon Marchi
2025-10-12 8:57 ` Andrew Burgess
2025-10-12 12:05 ` Simon Marchi [this message]
2025-10-12 13:13 ` Andrew Burgess
2025-11-19 10:32 ` Andrew Burgess
2025-10-11 13:34 ` [PATCH 2/2] gdb: use current executable for 'remote exec-file' in some cases Andrew Burgess
2025-10-11 14:45 ` Eli Zaretskii
2025-11-07 20:46 ` Simon Marchi
2025-11-11 15:59 ` Andrew Burgess
2026-01-14 1:17 ` Simon Marchi
2026-01-14 16:48 ` Andrew Burgess
2026-01-14 20:01 ` [PATCH] gdb/testsuite: fix failure in gdb.server/fetch-exec-and-args.exp Andrew Burgess
2026-01-15 21:13 ` Simon Marchi
2026-01-22 15:31 ` Andrew Burgess
2025-11-19 10:32 ` [PATCH 2/2] gdb: use current executable for 'remote exec-file' in some cases 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=fe2ba50b-902b-4c0a-b8bd-d388ae98bd0a@simark.ca \
--to=simark@simark.ca \
--cc=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