From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7670 invoked by alias); 20 Feb 2014 21:24:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 7611 invoked by uid 89); 20 Feb 2014 21:24:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ve0-f201.google.com Received: from mail-ve0-f201.google.com (HELO mail-ve0-f201.google.com) (209.85.128.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 20 Feb 2014 21:24:34 +0000 Received: by mail-ve0-f201.google.com with SMTP id jx11so324373veb.2 for ; Thu, 20 Feb 2014 13:24:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:subject:in-reply-to :references; bh=KLHzDtaObBcvaB/EYgZV8VvUMQw+sLFzJ4IHzMMmnWg=; b=ihGRHfNv+tSH2ZlahcBNL89jMmIlmWN2daezZKVwQiICkCUhqVhJ9m3ZWKTEhnTSrW Hks8cd8GZZpoQkDJ1ZlWsuRCMcLHGU/5h1qR79OcyLzsmg02QJC/U1mp68AcLB5PvsLT EEW9r+QB+zPCys3s1dPM5+K45jSpQL21T27XfWVKyDdvhzYBincdzKPTRA0c7rDZqPn7 F95doe6C0tUt8Hw4DeMcO5cO93Wy2f+N34QTCN8vMGGoaoHjaXMhSc3CdSaD2EJolV9M GVI8J7BxWQEGQMvFGId9kulacSiQOTEJ/tJ1KEGwi6QfA1D7UvDKomoifCakzsEVKn3e O46A== X-Gm-Message-State: ALoCoQkYzvvo8/veKjFE/RoVKkPDAD12W1FIQgiCuPs30ZiLTvIIY6rI+fkvd3qY4uP8o+SgAvcMG6qLq+HaxJ1KHvjJcCwBslW8FzCh5c4TFKvF84GF2BAfgAV0hqZPcQM//IawPA7qcK4YLXGtUmpEgloP4ECwe6Z96pKdid6vEhytFpNUwzZTKYkThbCPZFvz117K0cz/UcmjRB+rtUz7DYcegRBwY8AnI3H9Wf8KrlpPfmJrjjk= X-Received: by 10.236.180.2 with SMTP id i2mr1548002yhm.4.1392931471348; Thu, 20 Feb 2014 13:24:31 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id u4si336761yhb.5.2014.02.20.13.24.31 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Feb 2014 13:24:31 -0800 (PST) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id F3D8B31C04E for ; Thu, 20 Feb 2014 13:24:30 -0800 (PST) From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21254.29326.442029.857010@ruffy.mtv.corp.google.com> Date: Thu, 20 Feb 2014 21:24:00 -0000 To: gdb-patches@sourceware.org Subject: [commit] linux-low.c (add_lwp): Change result to struct lwp_info *. In-Reply-To: References: X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00662.txt.bz2 Doug Evans writes: > Hi. > This is the main patch. > The concept is very simple: remove all_lwps. > I think it's the right thing to do, I can't think of a good reason > to maintain two separate lists of threads, each containing a subset > of the data needed. > > Alas implementing this involves a lot of work. I split this patch out. Committed. 2014-02-19 Doug Evans * linux-low.c (add_lwp): Change result to struct lwp_info *. All callers updated. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 2a83022..910d96d 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -226,7 +226,7 @@ static void linux_resume (struct thread_resume *resume_info, size_t n); static void stop_all_lwps (int suspend, struct lwp_info *except); static void unstop_all_lwps (int unsuspend, struct lwp_info *except); static int linux_wait_for_event (ptid_t ptid, int *wstat, int options); -static void *add_lwp (ptid_t ptid); +static struct lwp_info *add_lwp (ptid_t ptid); static int linux_stopped_by_watchpoint (void); static void mark_lwp_dead (struct lwp_info *lwp, int wstat); static void proceed_all_lwps (void); @@ -408,7 +408,7 @@ handle_extended_wait (struct lwp_info *event_child, int wstat) } ptid = ptid_build (pid_of (event_child), new_pid, 0); - new_lwp = (struct lwp_info *) add_lwp (ptid); + new_lwp = add_lwp (ptid); add_thread (ptid, new_lwp); /* Either we're going to immediately resume the new thread @@ -525,7 +525,7 @@ get_stop_pc (struct lwp_info *lwp) return stop_pc; } -static void * +static struct lwp_info * add_lwp (ptid_t ptid) { struct lwp_info *lwp; @@ -682,7 +682,7 @@ linux_attach_lwp_1 (unsigned long lwpid, int initial) ptid = ptid_build (pid, lwpid, 0); } - new_lwp = (struct lwp_info *) add_lwp (ptid); + new_lwp = add_lwp (ptid); add_thread (ptid, new_lwp); /* We need to wait for SIGSTOP before being able to make the next