From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13962 invoked by alias); 20 Feb 2014 18:18:59 -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 13848 invoked by uid 89); 20 Feb 2014 18:18:58 -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-f174.google.com Received: from mail-ve0-f174.google.com (HELO mail-ve0-f174.google.com) (209.85.128.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 20 Feb 2014 18:18:56 +0000 Received: by mail-ve0-f174.google.com with SMTP id pa12so2237240veb.33 for ; Thu, 20 Feb 2014 10:18:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=cmMr82glsXkysr7j8U0XOjvqYK182F0DFM6eqmbpegU=; b=DleVJtzcpHjEzagAL2ktaW/xl8utk8pAz8ryBpYkmD/ngFOC6jTjOTp+fqek+iBA5B rVgWPnAP1S9q6hz05upu+BEcAmklD9DwxyCnDDnNCjXxFxDxNYdPzlLGNjhLBIpXy2So VE+oRoIuZPJJGqPd2GfQB/0mFFgP3y0K+Ut/8JnKtjWwvgQAfWeZiauu9iaYCurjLpWA K5CzthTN5EVI/3kMu/xXiBA3Ony4LQ9gfu/9Fvw/jaImlNVjx3VsZ8ae4pBVODZw6X0B oVkzYw+HC1uREpf0NLq0dQA32VMTa1GDvq6m1HpwHGVXgTZCYS9O7KQtN1ULHjXRjl15 qz8Q== X-Gm-Message-State: ALoCoQlVZLJSAJ2h/L+MtgVaFtct11HB2ciBCAHxUR5CaZJAQg3XemKF84rBAHWVJBPKSxK0spJ1gmvRhBfKG4jDFSjEzxF1SqlnJuhyZhnTZ9mOYaj9c6htRXaKqwuw9u3JzshD7l/Cj13LBjA4mojupOBrh9qyzN+mTzL4SRSxgRI9uabN74vKDS8/KhClIo0e+utexigyE4bRkqS5Xz2UQNs6feUZug== MIME-Version: 1.0 X-Received: by 10.221.66.132 with SMTP id xq4mr1796692vcb.57.1392920334208; Thu, 20 Feb 2014 10:18:54 -0800 (PST) Received: by 10.52.51.234 with HTTP; Thu, 20 Feb 2014 10:18:54 -0800 (PST) In-Reply-To: <530605CA.4040700@redhat.com> References: <52F37FC2.5040001@redhat.com> <530605CA.4040700@redhat.com> Date: Thu, 20 Feb 2014 18:18:00 -0000 Message-ID: Subject: Re: [PATCH v2 2/3] remove all_lwps from gdbserver: use list api From: Doug Evans To: Pedro Alves Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00653.txt.bz2 On Thu, Feb 20, 2014 at 5:40 AM, Pedro Alves wrote: > On 02/19/2014 11:31 PM, Doug Evans wrote: >> On Thu, Feb 6, 2014 at 4:27 AM, Pedro Alves wrote: >>> On 01/29/2014 06:11 PM, Doug Evans wrote: > >> Committed with the suggested changes. >> > > Thanks! > > (Note that we request contributors to always post what goes into > the tree, if there were changes since the last post / approval, > so I think we should get into the habit of doing that ourselves too.) That's the plan .... It was getting late and I had a few more things to do. If there is a < 24(?) hour deadline for such things we'd better write it down .... > >>>> +struct inferior_list_entry * >>>> +get_first_inferior (void) >>>> +{ >>>> + if (all_threads.head != NULL) >>>> + return all_threads.head; >>> >>> I think this one, being an "inferior" function, should take >>> a list as argument. > > I noticed a little buglet slipped here: > > +/* Return a pointer to the first inferior in LIST, or NULL if there isn't one. > + This is for cases where the caller needs a thread, but doesn't care > + which one. */ > + > +struct inferior_list_entry * > +get_first_inferior (struct inferior_list *list) > +{ > + if (all_threads.head != NULL) > + return all_threads.head; > > Should be: > > if (list->head != NULL) > return list->head; Bleah.