From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0J+vK1yzvV93eQAAWB0awg (envelope-from ) for ; Tue, 24 Nov 2020 20:29:00 -0500 Received: by simark.ca (Postfix, from userid 112) id B11651F0AB; Tue, 24 Nov 2020 20:29:00 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [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 5C6F01E58E for ; Tue, 24 Nov 2020 20:29:00 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8212839540E0; Wed, 25 Nov 2020 01:28:59 +0000 (GMT) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by sourceware.org (Postfix) with ESMTPS id 81BB339540E0 for ; Wed, 25 Nov 2020 01:28:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 81BB339540E0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wm1-f66.google.com with SMTP id a186so630412wme.1 for ; Tue, 24 Nov 2020 17:28:56 -0800 (PST) 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:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gVAYjSy6MUsby7wVYjqoSqatWVArrVyL1OhW8QqasQc=; b=VxPqTja1RedD+TG6fe6Bvfq0jCZqzsJAhJSOhYYLZLsADcEKQ1fQGgKKAw3GjmwV7V 8q3L1D4X8Nzjk5vjaTSKiXJxPpFRIXr0pHk8UqnfHe3gbS3IXBn7XqpcGpfeh0uZahTO 8djT1+xwKJWEXudnXfZHx+gR/H+fF3JX2rqWq+XAQs/iS/wupad+vWOYQPa1pWR74OGK KnMeSp5I31UG7Q1d/L/Cgg/hIFudbo1RtQSW6MbnUFan9Eodtq8IGo6EFNhkt5thFWha VRyk7jZ7r/VscF82trbbHA1YVhuvdCqsDdSu3mGnPyJB04zvoUxN3J5snkFTU1wX9pI3 hPSg== X-Gm-Message-State: AOAM532Yh1ySQRvR9W2gBPvR7ymHwDJsUHL634p0V+/FeNzqTDGXLQW/ NWcb/UxG5o/v+s1e77FNhUqcS+aHPB58hg== X-Google-Smtp-Source: ABdhPJxscKjpCfNOqPH93kvxwVUS5nUgG8n0ZwdPSJc78emI60F0Xd0TiugmOPoasqc/ZxbmjYjnNA== X-Received: by 2002:a1c:2384:: with SMTP id j126mr1126462wmj.116.1606267734961; Tue, 24 Nov 2020 17:28:54 -0800 (PST) Received: from ?IPv6:2001:8a0:f91f:e900:1d90:d745:3c32:c159? ([2001:8a0:f91f:e900:1d90:d745:3c32:c159]) by smtp.gmail.com with ESMTPSA id o67sm1244140wmo.31.2020.11.24.17.28.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Nov 2020 17:28:53 -0800 (PST) Subject: Re: [PATCH 03/12] gdb: rename things related to step over chains To: Simon Marchi , gdb-patches@sourceware.org References: <20201110214614.2842615-1-simon.marchi@efficios.com> <20201110214614.2842615-4-simon.marchi@efficios.com> From: Pedro Alves Message-ID: Date: Wed, 25 Nov 2020 01:28:53 +0000 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: <20201110214614.2842615-4-simon.marchi@efficios.com> 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 11/10/20 9:46 PM, Simon Marchi via Gdb-patches wrote: > Rename step_over_queue_head to global_thread_step_over_chain_head, to > make it more obvious when reading code that we are touching the global > queue. Rename all functions that operate on it to have "global" in > their name, to make it clear on which chain they operate on. Also, in a > subsequent patch, we'll need both global and non-global versions of > these functions, so it will be easier to do the distinction if they are > named properly. > > Normalize the naming to use "chain" everywhere instead of sometimes > "queue", sometimes "chain". > > I also reworded a few comments in gdbthread.h. They implied that the > step over chain is per-inferior, when in reality there is only one > global chain, not one per inferior, as far as I understand. > > gdb/ChangeLog: > > * gdbthread.h (thread_step_over_chain_enqueue): Rename to... > (global_thread_step_over_chain_enqueue): ... this. Update all > users. > (thread_step_over_chain_remove): Rename to... > (global_thread_step_over_chain_remove): ... this. Update all > users. > (thread_step_over_chain_next): Rename to... > (global_thread_step_over_chain_next): ... this. Update all > users. > * infrun.h (step_over_queue_head): Rename to... > (global_thread_step_over_chain_head): ... this. Update all > users. > * infrun.c (step_over_queue_head): Rename to... > (global_thread_step_over_chain_head): ... this. Update all > users. > * thread.c (step_over_chain_remove): Rename to... > (thread_step_over_chain_remove): ... this. Update all users. > (thread_step_over_chain_next): Rename to... > (global_thread_step_over_chain_next): ... this. Update all > users. > (thread_step_over_chain_enqueue): Rename to... > (global_thread_step_over_chain_enqueue): ... this. Update all > users. > (thread_step_over_chain_remove): Rename to... > (global_thread_step_over_chain_remove): ... this. Update all > users. > > Change-Id: Iabbf57d83c01321ca199d83fadb57f5b04e4d6d9 > --- > gdb/gdbthread.h | 16 ++++++++-------- > gdb/infrun.c | 26 +++++++++++++------------- > gdb/infrun.h | 4 ++-- > gdb/thread.c | 18 +++++++++--------- > 4 files changed, 32 insertions(+), 32 deletions(-) > > diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h > index 630727e2fb5..b5a32087289 100644 > --- a/gdb/gdbthread.h > +++ b/gdb/gdbthread.h > @@ -741,20 +741,20 @@ extern value *get_last_thread_stack_temporary (struct thread_info *tp); > extern bool value_in_thread_stack_temporaries (struct value *, > struct thread_info *thr); > > -/* Add TP to the end of its inferior's pending step-over chain. */ > +/* Add TP to the end of the global pending step-over chain. */ > > -extern void thread_step_over_chain_enqueue (struct thread_info *tp); > +extern void global_thread_step_over_chain_enqueue (struct thread_info *tp); > > -/* Remove TP from its inferior's pending step-over chain. */ > +/* Remove TP from the global pending step-over chain. */ > > -extern void thread_step_over_chain_remove (struct thread_info *tp); > +extern void global_thread_step_over_chain_remove (struct thread_info *tp); > > -/* Return the next thread in the step-over chain starting at TP. NULL > - if TP is the last entry in the chain. */ > +/* Return the thread following TP in the global step-over chain, or NULL if TP > + is the last entry in the chain. */ > > -extern struct thread_info *thread_step_over_chain_next (struct thread_info *tp); > +extern struct thread_info *global_thread_step_over_chain_next (struct thread_info *tp); Line too long now. > --- a/gdb/thread.c > +++ b/gdb/thread.c > @@ -207,7 +207,7 @@ set_thread_exited (thread_info *tp, bool silent) > { > /* Dead threads don't need to step-over. Remove from queue. */ "Remove from chain", I guess. > if (tp->step_over_next != NULL) > - thread_step_over_chain_remove (tp); > + global_thread_step_over_chain_remove (tp); > Otherwise OK.