From patchwork Wed May 15 15:45:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32700 Received: (qmail 17907 invoked by alias); 15 May 2019 15:45:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 17816 invoked by uid 89); 15 May 2019 15:45:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: gateway24.websitewelcome.com Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.51.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 May 2019 15:45:31 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway24.websitewelcome.com (Postfix) with ESMTP id BE50AABC2 for ; Wed, 15 May 2019 10:45:27 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id Qw5vhRhKJ2PzOQw5vhrmkq; Wed, 15 May 2019 10:45:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hxytvqzxqGS31RPTz12PwLLZEeN4H5zba+kKzupQ+mU=; b=qWPylCvBznr71mWbCPgIgXmnve 1G43EeuMsismvWrwc+G47n/EjMJZpZeNiv6i9xhalpN2On7RVAIj4vaCevfn3jaGJWN4wzwmRk/Ld hH60G65kUfRxD2yU78JpUovxO; Received: from 97-122-168-123.hlrn.qwest.net ([97.122.168.123]:60430 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hQw5v-002Loj-HA; Wed, 15 May 2019 10:45:27 -0500 From: Tom Tromey To: John Marshall Cc: Tom Tromey , Sandra Loosemore , "gdb-patches\@sourceware.org" Subject: Re: [PATCH 3/3] Introduce a separate debug objfile iterator References: <20190409180945.21621-1-tom@tromey.com> <20190409180945.21621-4-tom@tromey.com> <87a7g73306.fsf@tromey.com> <87ef5iyrjf.fsf@tromey.com> <28398247-e959-c206-8ab0-1af1c6fa98cd@codesourcery.com> <87lfzni0cq.fsf@tromey.com> <10A9B885-24C4-41CF-B2A3-85F78EFDE265@glasgow.ac.uk> Date: Wed, 15 May 2019 09:45:26 -0600 In-Reply-To: <10A9B885-24C4-41CF-B2A3-85F78EFDE265@glasgow.ac.uk> (John Marshall's message of "Wed, 15 May 2019 09:45:21 +0000") Message-ID: <87y337yb55.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 >>>>> "John" == John Marshall writes: John> On 3 May 2019, Tom Tromey wrote: >> commit bba6afebd7fde978acb6e06a48084a694aab3b7a >> Author: Tom Tromey >> Date: Fri May 3 17:21:36 2019 -0600 >> >> Remove "struct" from foreach statements >> [snip] >> * darwin-nat.c (thread_info_from_private_thread_info): Remove >> "struct" from foreach. John> This broke compilation on macOS (tested on Mojave) with both Clang and GCC (9.1.0): Can you try the appended? I no longer have a macOS machine to test on. If this works for you, I will check it in. This clashes with the normal gcc bug workaround that we do here; but I think on macOS that probably isn't worth worrying about. Tom diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index e3368ce6471..8282ef27e61 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -1706,7 +1706,7 @@ darwin_attach_pid (struct inferior *inf) static struct thread_info * thread_info_from_private_thread_info (darwin_thread_info *pti) { - for (thread_info *it : all_threads ()) + for (struct thread_info *it : all_threads ()) { darwin_thread_info *iter_pti = get_darwin_thread_info (it);