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 5A5243858D20 for ; Fri, 11 Aug 2023 15:06:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A5243858D20 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=1691766395; 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=HSR8E6J74GOm52ZzTJMriFhUsNaPfw4riLzYnWgXnFM=; b=RpA9CZoTeHMFyVqBSHp/G0CXMNLaLIfTvhf2QCmg6bAXZWpoiID3FG77BicTm25Sj9VUM1 j31lImd6sGg9pugjxRsqrtldj1wWlVsILB8VmUL4LlMiom//yw3s/uqNR21BBiQJbdXZTd 32cuEyBTGVD7U7K5Hk63rLUX14hhecA= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-152--vAyBolwNku2iJh_cF1xPA-1; Fri, 11 Aug 2023 11:06:33 -0400 X-MC-Unique: -vAyBolwNku2iJh_cF1xPA-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3fd0fa4d08cso13206215e9.1 for ; Fri, 11 Aug 2023 08:06:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691766392; x=1692371192; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HSR8E6J74GOm52ZzTJMriFhUsNaPfw4riLzYnWgXnFM=; b=C8NlnwmVvY/yxVE0vriu+QF5NrmiNqFKchX6QiJ7zrqabZKP26qw5H8S3r9W79gkwW wNK553gDjfxJsQJYI9prbwEYdXqGc+IksBIGF8UD1QYKnBCv7yW9qz/Tkn2nRwoQGF9e 22K4W5yPfdcQUMynm1C7CVKUWUi3+jb0bdBk3acB+6Bm/0EJNRfJdHYrMCskVFUtrjRc Ft6ul79VdIofwb6eR0a3gtVcfbK2umxqwm1tnfaEv3hCJqPJx3PINIl7LWwzpTG1RI4e elSXGCdhpZoU4aP/HDBT+5O215QOq8JIu67FZS0U/mBXAQOvCfxqXAnnToJuxnbIi4aC 9MJg== X-Gm-Message-State: AOJu0YxP+ywEZeocpl1vgHQoutzs4FQQskLi/6yB/aSYAQSjnZI7mMPm +KXDSOjTHV0A6TfhbLkgFHbbktwr2NfH/6YZGDKG0vX8EUywAyD9TwkxYC3rYTm+kZ7ICnF8LnN oim2/Nr7DshvBCpC+4pIIagjmhz1bSA== X-Received: by 2002:a05:600c:3648:b0:3fd:2d42:9392 with SMTP id y8-20020a05600c364800b003fd2d429392mr1890347wmq.4.1691766392442; Fri, 11 Aug 2023 08:06:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH56IuA8p2q7q9AaRXBvxq6Hjwc+Or1PM6GN5MY27ZIjkcXyGRmOkrpA04Yk/+WyqlyKVAUcw== X-Received: by 2002:a05:600c:3648:b0:3fd:2d42:9392 with SMTP id y8-20020a05600c364800b003fd2d429392mr1890330wmq.4.1691766392115; Fri, 11 Aug 2023 08:06:32 -0700 (PDT) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id y7-20020a056000108700b003188358e08esm5149267wrw.42.2023.08.11.08.06.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 08:06:31 -0700 (PDT) From: Andrew Burgess To: Tom Tromey Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH v2 5/9] Introduce "static constructor" for mi_parse In-Reply-To: <87jzu1208f.fsf@tromey.com> References: <20230404-dap-loaded-sources-v2-0-93f229095e03@adacore.com> <20230404-dap-loaded-sources-v2-5-93f229095e03@adacore.com> <875y5let9x.fsf@redhat.com> <87jzu1208f.fsf@tromey.com> Date: Fri, 11 Aug 2023 16:06:30 +0100 Message-ID: <87jzu1d3ex.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: Tom Tromey writes: >>>>>> "Andrew" == Andrew Burgess writes: > > Andrew> Sorry to respond to such an old thread, but I ran into the > Andrew> mi_parse::make code today. From your commit message I don't see the > Andrew> connection for why we need a static mi_parse::make function in order to > Andrew> get rid of the set_args method. > > Andrew> For reference, I switched the code back to using constructors (but > Andrew> didn't add back set_args), and I'm not seeing any regressions in > Andrew> gdb.mi/* and gdb.python/*. > > Andrew> Could you expand on why this change is needed? > > I don't recall what exactly I was thinking when I wrote it. It might > have been a leftover from some other attempt to use unique_ptr to ensure > there isn't a possibility of a leak. > > I think it's fine to switch it to constructors if that is convenient for > you. Thanks. I'll CC you when I post the patch. Just thought I'd ask first, didn't want to look like I was just trying to revert your work :) Thanks, Andrew