public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
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: Sat, 11 Oct 2025 09:46:13 -0400	[thread overview]
Message-ID: <469655a7-2bcc-4f27-b2d7-3fa8808ca5b5@simark.ca> (raw)
In-Reply-To: <d9d94257e854d1b4d2566876c9c72189095937b8.1760189398.git.aburgess@redhat.com>



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.

Simon

  reply	other threads:[~2025-10-11 13:46 UTC|newest]

Thread overview: 11+ 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 [this message]
2025-10-12  8:57       ` Andrew Burgess
2025-10-12 12:05         ` Simon Marchi
2025-10-12 13:13           ` 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

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=469655a7-2bcc-4f27-b2d7-3fa8808ca5b5@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).