From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7B8263858C01 for ; Wed, 23 Aug 2023 08:44:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B8263858C01 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692780262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Gxdu6E9q35O4+C29olSuz1NlRLNQT+h5aASujROBQXI=; b=eVh32X3RZUPXTdHpU4WJO+qd/7sZexjWn08XaXCEGW3EiUUTrLv+cDaegNEA9uGkMdxtvq 5jxhkMr3PzIn9Z4vIVXNLgaU94NJhb4+gzbLCxAcrGarxJOBQiu0OBmUZ/h21+Tn/9VHJR 5WSPF42CzYmd+f/ub1rdUoxlG23Oano= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-626-gxIxFLFXNzaGDk0i43A0Qg-1; Wed, 23 Aug 2023 04:44:20 -0400 X-MC-Unique: gxIxFLFXNzaGDk0i43A0Qg-1 Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-26b3d43a0bfso5792225a91.0 for ; Wed, 23 Aug 2023 01:44:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692780259; x=1693385059; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Gxdu6E9q35O4+C29olSuz1NlRLNQT+h5aASujROBQXI=; b=i+u4qU5QBzw6r1zTKprCEeS5xTt4lWM7MbSS8IasmmWrXY2tIU7TGzTIVomgLFYSuc K7WnUrlUQUqJHwLDH6WID+/j8LG+opnSfix1y+HFYWaJRx8d5a6xNbq0KDLW4zrJPmHA z9uQHSo3ZkX4lSFjijIHaG2qtyHFWB0Wru78XEz8AuTZ98bBeerjL6yUD+RALO0KFCZs CZCoo2TItUzeS0ynA8LdVnJudOM0n50YXkY+mjZ9dtU5Cv7YA71hP9z4s+tCVFU/dLML 0hKdkwQYCZBU8dzhqF2YSKnDcg57wYKZ9j/lBcpRXTxFQtNE3524g3EWfqWkHIvO8r71 ENHg== X-Gm-Message-State: AOJu0Yy2KgCPY0p8FX5E9kQiCkGIwjRaIB3bdjSLEvchJpZTO0Y/nGVA Equ97zjoKBbI5x8Xy0LQIygGoeLZ9d6d67LSj6OoggShQgwiy4YWM/jPxwD8VAxms3yAgycU3G+ IZDwFY4cSWosC5ok2R4vmd/o4585bVygBCYqJblqZAfgpsA== X-Received: by 2002:a17:90b:791:b0:267:f5d1:1dd3 with SMTP id l17-20020a17090b079100b00267f5d11dd3mr8656294pjz.11.1692780259080; Wed, 23 Aug 2023 01:44:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGRa3ZmwgYQws41gvH8E/3SkIq+ynCUjowNDCirBbQeWqxFO5eQRpJaKo5Y5gMfkan1R1e70Z91oThd7EfVA8= X-Received: by 2002:a17:90b:791:b0:267:f5d1:1dd3 with SMTP id l17-20020a17090b079100b00267f5d11dd3mr8656285pjz.11.1692780258818; Wed, 23 Aug 2023 01:44:18 -0700 (PDT) MIME-Version: 1.0 References: <5f67c7dddf114be368160ac202e68e63a664f16f.1692200989.git.aburgess@redhat.com> In-Reply-To: <5f67c7dddf114be368160ac202e68e63a664f16f.1692200989.git.aburgess@redhat.com> From: Alexandra Petlanova Hajkova Date: Wed, 23 Aug 2023 10:44:07 +0200 Message-ID: Subject: Re: [PATCH 02/10] gdb: improve how 'remote exec-file' is stored and accessed To: Andrew Burgess Cc: gdb-patches@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="00000000000002973f0603931ec6" X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000002973f0603931ec6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Aug 16, 2023 at 5:55=E2=80=AFPM Andrew Burgess via Gdb-patches < gdb-patches@sourceware.org> wrote: > This commit makes two related changes. The goal of the commit is to > update the 'remote exec-file' setting to work correctly in a > multi-inferior setup. To do this I have switched from the older > style add_setshow_* function, which uses a single backing variable, to > the newer style add_setshow_* functions that uses a get/set callback. > > The get/set callbacks now directly access the state held in the > progspace which ensures that the correct value is always returned. > > However, the new get/set API requires that the get callback return a > reference to the setting's value, which in this case needs to be a > std::string. > > Currently the 'remote exec-file' setting is stored as a 'char *' > string, which isn't going to work. > > And so, this commit also changes 'remote exec-file' to be stored as a > std::string within the progspace. > > Now, when switching between multiple inferiors, GDB can correctly > inform the user about the value of the 'remote exec-file' setting. > > Looks super reasonable. --00000000000002973f0603931ec6--