From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 59CB63851C01 for ; Thu, 14 May 2020 11:12:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 59CB63851C01 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-205-XpoHW1wtNfaL5dGqOg6pnQ-1; Thu, 14 May 2020 07:12:54 -0400 X-MC-Unique: XpoHW1wtNfaL5dGqOg6pnQ-1 Received: by mail-wr1-f69.google.com with SMTP id 30so1401986wrq.15 for ; Thu, 14 May 2020 04:12:54 -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:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9ReHrtilStwxqfQHTbw+87aaxYk7rfp8QjsH17KmEGs=; b=EJhXIWkAlD5Khuxpl9ZVU1lwU9f12te7NB24a3XLrbsyRYA4qGZLKpio3NSEL6Y/C4 f6B+uEqihCH/gPqgbxxO6WoT9JUfZBNrCsmMBpGSJ1+4yb90ZCgqNPnSShqiSQ8VqBgl 0vO0d36FCDZQDhS8aja9Qo+nzOZnrgUkvYC4BUgnv6zbl0pNznU44jjdDAu5/GiYXdr4 Z8U84zeDxFjiYP+bGCuU4cNXwFt/1+YDsWuzs5WzlaVMPOPjueOxSXOl5fop2PzulNGA rUQ8Gjop/dvyr5iivFqYk9rkhMv8USjLzjezwEBXvN3zPCIe4SUsdlQMc9muWy2hFBkV dWVQ== X-Gm-Message-State: AOAM533IxYcQZzMAeOpxX8avAuaRUfjZDpAqzcbLBJP5K5Hxt93sRZQH LHh5ccp/16HYGGj7/tg7uakvKTQ1oALI8wDnqtp/WMihO3AImCNuX7jwmXEOxK6F7hgwl3TifW6 Bf8cbzmiQ1Kfo2nURsuu38w== X-Received: by 2002:a05:6000:128b:: with SMTP id f11mr4857267wrx.227.1589454773163; Thu, 14 May 2020 04:12:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJvt/wQwtM4eUS3FT9+tX/rmNeb0BK75hhXfLijLvNzW3dBQM4LyvjUP00MrZ6i5/3o9E4LA== X-Received: by 2002:a05:6000:128b:: with SMTP id f11mr4857244wrx.227.1589454772933; Thu, 14 May 2020 04:12:52 -0700 (PDT) Received: from ?IPv6:2001:8a0:f909:7b00:56ee:75ff:fe8d:232b? ([2001:8a0:f909:7b00:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id 77sm3669584wrc.6.2020.05.14.04.12.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 May 2020 04:12:52 -0700 (PDT) Subject: Re: [PATCH v8 4/6] gdb: introduce 'all_non_exited_process_targets' and 'switch_to_target_no_thread' To: "Aktemur, Tankut Baris" References: <20200513205338.14233-1-palves@redhat.com> <20200513205338.14233-5-palves@redhat.com> Cc: Christian Biesinger , gdb-patches From: Pedro Alves Message-ID: Date: Thu, 14 May 2020 12:12:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.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_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Thu, 14 May 2020 11:12:57 -0000 On 5/14/20 9:44 AM, Aktemur, Tankut Baris wrote: > Christian suggested adding a comment here to state why a set was needed. > I thought about this: > > /* Inferiors may share targets. To eliminate duplicates, use a set. */ Sure, sounds good. (Note I had done one change compared to your previous version I forgot to mention -- the "#include " should be in the .h file, rather than in the .c file, because std::set is used in the .h file already.) Thanks, Pedro Alves