From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GZbqL5Op62gF0ysAWB0awg (envelope-from ) for ; Sun, 12 Oct 2025 09:13:55 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=B3E6CU4z; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C05EE1E047; Sun, 12 Oct 2025 09:13:55 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3EF571E047 for ; Sun, 12 Oct 2025 09:13:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BBCD83857439 for ; Sun, 12 Oct 2025 13:13:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BBCD83857439 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=B3E6CU4z Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 4FEB33858D37 for ; Sun, 12 Oct 2025 13:13:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4FEB33858D37 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4FEB33858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760274801; cv=none; b=kbe8KQcz3sn4RCMqHAPyAk4VkWNrCTIyqPoxtHN+v7qNuC+mFAE0ITA+13EeEBq2d1V+rpnntvcMDhy7EyBrFWTj0LQQZe0XvAv48tLqxPvpurWs/OLtOJj5aW2Gy5xKaLPR+wJFNE2H1lBgzbeV+bovPZZc1wYqDD4JIrAXEvg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760274801; c=relaxed/simple; bh=+eqRVFDxQMijIyzvlD4eQR5xjcafuVknY1eavM9sKtA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jyblCprLEJLTKU6Gg4/dnbU8VAJIb+vI30bqwYv4cASKEifvsGwaHD2YYBY+UpXdepnQ4pG4B/XC+r5O2m7tJlvtwBHij03fJISIoHmByBL/BidhUzuJEaD6g1coaTnPGkSM+8X+xPjQD3dAN9QFh5j8bhgR6yayy0KKXhzjpEw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4FEB33858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760274800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Wg0GoRghOON1b1dxiMI0p/uyzPrEDh9a+oWJe9bSB0E=; b=B3E6CU4zdzZc6s68IT+16hxvHjmo9n8EXBZ6pOsQUB1NUay/A5l/h20RRzf8uz3xA6uICc YfgiGXzS0Os7PIdwqhmIy5LPMoJ0CpKOFqlqP/SLpvtw99iJbVyJzEj7DbO7OZgj5tz/K1 JESLvifvVOR8KLfoiGIshX22cmY28us= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-132-zUrp5OlJPsCnpzL2Uz7bfg-1; Sun, 12 Oct 2025 09:13:19 -0400 X-MC-Unique: zUrp5OlJPsCnpzL2Uz7bfg-1 X-Mimecast-MFC-AGG-ID: zUrp5OlJPsCnpzL2Uz7bfg_1760274798 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-46e2c11b94cso23786395e9.3 for ; Sun, 12 Oct 2025 06:13:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760274798; x=1760879598; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Wg0GoRghOON1b1dxiMI0p/uyzPrEDh9a+oWJe9bSB0E=; b=qiHl2KDa3JrjqWohvNV90a0pofD5TCWSF2fyBjuREAQE0DMNuer5AGO8miVavnfcnZ KAOWsfQH7DSeSPUtheSXqIidN03yrYi+gQzxiWn+d5g9GEv5jBx3Yo5bFOoT8ZRx5H34 6S8ZAocM+etvMXygmnFVg0nMliil+A1/TPSsRekthoILDzKps7Lce7knthaXXYluhsgY EoQkkpgqSifB3Z0FEIxTf3qJXenyZkyfEQxaxF++I8IPhRe1ytx2lwQFSD7l6lTdeazs LilnsNjini2irKZOSYdYVXd9SWmeJR9Ufr5Fs5zrTGJ3G9TTv2ddEuBClFiFta4GVoKW 66XQ== X-Forwarded-Encrypted: i=1; AJvYcCVdQ4hd6i6uCr+SfysbkMkp32r1sEEo5U94c3R90XlxB2Gj1WgoPCs8Fg5PiB4a7Rdy14u3km56aHON/w==@sourceware.org X-Gm-Message-State: AOJu0YywXS480hQMIU3Zn3BFCIgjSqK5vXN5F0tSLuhdFGNdkFVvQAKz KMYpdH1ki5RwSj/lXpbkGd05/rt5gnbw7GYkBnAu3ALu/YPXMxibVi6F3YJBeCcA1KwNFe3QpkJ jsbiI2FAYE90k/YBlri/O/zfVGgQYQpAz0igZs0kxsXQIuitwJAysMfBa53lnKrzLGYs1YCc= X-Gm-Gg: ASbGncvXuFcUBYhYQ6G57osg87IjlSL2XyGHT5APQ3Q2zAXXs7jQTcxRZ3Wg71i1VGT kKgLd7h0U8x/AKqKXLg/+5flFz50VVDTjNQKI4IsGDlN5ls0e9fwlhZhZMibnaAwunri21i0ecg F6VM3SmezPA5XAf/gSYw8xeVa1fDiN/m/gYZ21RWvTnY7H5fTxL83v2VrgDrBkZE/FtFP6Bnzuo QFyASmXvAaRyQFtceX70cOr60r6PVxuqtqbA5CGJ6ZpR/TQquNCHoftdZGi9jKjzlmRyaOUAyP1 En/oGsf7cedYjy9UUvC3mM9MQjaA8DS0xOQ= X-Received: by 2002:a05:600c:138a:b0:46e:506b:20c5 with SMTP id 5b1f17b1804b1-46fa9b092aemr109346345e9.26.1760274798111; Sun, 12 Oct 2025 06:13:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHzP8z3GDwp24qUgHeCCTaMgK99wWL+RCH9hBlnG5RovXUkUTMTFO1Fc+BgVtuHpxl2uZpdHg== X-Received: by 2002:a05:600c:138a:b0:46e:506b:20c5 with SMTP id 5b1f17b1804b1-46fa9b092aemr109346235e9.26.1760274797602; Sun, 12 Oct 2025 06:13:17 -0700 (PDT) Received: from localhost ([31.111.84.207]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46fb492e6ddsm151134005e9.0.2025.10.12.06.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Oct 2025 06:13:16 -0700 (PDT) From: Andrew Burgess To: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] gdb/remote: replace use of std::pair with an actual struct In-Reply-To: References: <40cbbd9f0082b07e9767656fe044bbe9280983a3.1759763251.git.aburgess@redhat.com> <469655a7-2bcc-4f27-b2d7-3fa8808ca5b5@simark.ca> <87jz104hwc.fsf@redhat.com> Date: Sun, 12 Oct 2025 14:13:15 +0100 Message-ID: <87h5w4461g.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: yPYyhZ17FkyM6BYRxqS6uDSJxUNboEPCT775h5lfJp8_1760274798 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Simon Marchi writes: > On 2025-10-12 04:57, Andrew Burgess wrote: >> Simon Marchi 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 >>> >>> 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 I pushed just this patch for now. Thanks, Andrew