From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wC7UGRUp42DSYgAAWB0awg (envelope-from ) for ; Mon, 05 Jul 2021 11:45:25 -0400 Received: by simark.ca (Postfix, from userid 112) id 676EC1F1F2; Mon, 5 Jul 2021 11:45:25 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C66B71E940 for ; Mon, 5 Jul 2021 11:45:24 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 92E78383D809 for ; Mon, 5 Jul 2021 15:45:24 +0000 (GMT) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by sourceware.org (Postfix) with ESMTPS id 9110D3864805 for ; Mon, 5 Jul 2021 15:45:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9110D3864805 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f44.google.com with SMTP id l5so5849438wrv.7 for ; Mon, 05 Jul 2021 08:45:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LfCDpcfUYXqm1zFzXFb31WReuC5pWXLilqyr+3BEzkE=; b=MGHi1NVCTvyMLEo3ClGHxLt2DwiPGkfxq6dmc7jSQNf3ZeGYu3dFkuolvRkHN7rBe9 iVVeljwaNRke5ykPaneo1WOkmqwZu7Uxr40jhkR6MdK2yZca0Uz0kiZYACXY4YwThrIq HH8B4azt8tYnouPtcX+LZXi5SM1u/eHlm6b/hX3Am4GaQ7cG4sVl6yUtlSphwrzZGcx8 082IQcFXPqVbWhTyvhbf9/Fs9biSsybWk8BwXecz9Gb1YxsnsiNR4hP6i9VACGH0aWa5 kIMhQmlJZpLtZsf+Zb5fVMG4JqdVcScvwjljAYhuVIy4ogb+OsUg8arZ0cqpQUuuCoMI YD6A== X-Gm-Message-State: AOAM530v1yUdSyxP7gTyjXabWERZw/7EupKW+F/CXODCUGVoKgCAmXGb MroECT4YN8uTiooY2d7SWjc= X-Google-Smtp-Source: ABdhPJwF7fLZzcPzTsfUpS8czG1bxewvSLZeNnXX9mS/FOLqtjMdM9AocVZQ41HYlD12yPRS0YtHDQ== X-Received: by 2002:a5d:608a:: with SMTP id w10mr53142wrt.352.1625499901727; Mon, 05 Jul 2021 08:45:01 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:46bc:d03b:7b3a:2227? ([2001:8a0:f932:6a00:46bc:d03b:7b3a:2227]) by smtp.gmail.com with ESMTPSA id v2sm13135812wru.16.2021.07.05.08.45.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jul 2021 08:45:00 -0700 (PDT) Subject: Re: [PATCH 03/11] gdb: make inferior_list use intrusive_list From: Pedro Alves To: Simon Marchi , gdb-patches@sourceware.org References: <20210622165704.2404007-1-simon.marchi@polymtl.ca> <20210622165704.2404007-4-simon.marchi@polymtl.ca> Message-ID: <41c21f12-6343-e957-0769-4f3bc5b29433@palves.net> Date: Mon, 5 Jul 2021 16:44:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210622165704.2404007-4-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-06-22 5:56 p.m., Simon Marchi wrote: > From: Pedro Alves > > Change inferior_list, the global list of inferiors, to use > intrusive_list. I think most other changes are somewhat obvious > fallouts from this change. > > There is a small change in behavior in scoped_mock_context. Before this > patch, constructing a scoped_mock_context would replace the whole > inferior list with only the new mock inferior. Tests using two > scoped_mock_contexts therefore needed to manually link the two inferiors > together, as the second scoped_mock_context would bump the first mock > inferior from the thread list. With this patch, a scoped_mock_context > adds its mock inferior to the inferior list on construction, and removes > it on destruction. This means that tests run with mock inferiors in the > inferior list in addition to any pre-existing inferiors (there is always > at least one). There is no possible pid clash problem, since each > scoped mock inferior uses its own process target, and pids are per > process target. LGTM, FWIW...