From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simon.marchi@efficios.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 03/12] gdb: rename things related to step over chains
Date: Wed, 25 Nov 2020 01:28:53 +0000 [thread overview]
Message-ID: <dd587c56-281b-7581-fe54-2c3c492508e2@palves.net> (raw)
In-Reply-To: <20201110214614.2842615-4-simon.marchi@efficios.com>
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.
next prev parent reply other threads:[~2020-11-25 1:28 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 21:46 [PATCH 00/12] Concurrent displaced stepping Simon Marchi
2020-11-10 21:46 ` [PATCH 01/12] gdb: add inferior_execd observable Simon Marchi
2020-11-25 1:28 ` Pedro Alves
2020-11-10 21:46 ` [PATCH 02/12] gdb: clear inferior displaced stepping state on exec Simon Marchi
2020-11-25 1:28 ` Pedro Alves
2020-12-01 4:27 ` Simon Marchi
2020-11-10 21:46 ` [PATCH 03/12] gdb: rename things related to step over chains Simon Marchi
2020-11-25 1:28 ` Pedro Alves [this message]
2020-11-25 13:16 ` Simon Marchi
2020-11-10 21:46 ` [PATCH 04/12] gdb: rename displaced_step_closure to displaced_step_copy_insn_closure Simon Marchi
2020-11-25 1:29 ` Pedro Alves
2020-11-10 21:46 ` [PATCH 05/12] gdb: rename displaced_step_fixup to displaced_step_finish Simon Marchi
2020-11-25 1:29 ` Pedro Alves
2020-11-10 21:46 ` [PATCH 06/12] gdb: introduce status enum for displaced step prepare/finish Simon Marchi
2020-11-11 23:36 ` Andrew Burgess
2020-11-25 13:17 ` Simon Marchi
2020-11-25 1:30 ` Pedro Alves
2020-11-25 13:20 ` Simon Marchi
2020-11-10 21:46 ` [PATCH 07/12] gdb: pass inferior to get_linux_inferior_data Simon Marchi
2020-11-25 1:30 ` Pedro Alves
2020-11-10 21:46 ` [PATCH 08/12] gdb: move displaced stepping types to displaced-stepping.{h, c} Simon Marchi
2020-11-25 1:30 ` Pedro Alves
2020-11-10 21:46 ` [PATCH 09/12] gdb: move displaced stepping logic to gdbarch, allow starting concurrent displaced steps Simon Marchi
2020-11-25 1:40 ` Pedro Alves
2020-11-25 19:29 ` Simon Marchi
2020-11-25 19:35 ` Simon Marchi
2020-11-26 14:25 ` Pedro Alves
2020-11-30 19:13 ` Simon Marchi
2020-11-26 14:24 ` Pedro Alves
2020-11-30 20:26 ` Simon Marchi
2020-11-10 21:46 ` [PATCH 10/12] gdb: change linux gdbarch data from post to pre-init Simon Marchi
2020-11-25 1:41 ` Pedro Alves
2020-11-10 21:46 ` [PATCH 11/12] gdb: make displaced stepping implementation capable of managing multiple buffers Simon Marchi
2020-11-25 1:41 ` Pedro Alves
2020-11-30 18:58 ` Simon Marchi
2020-11-30 19:01 ` Simon Marchi
2020-11-10 21:46 ` [PATCH 12/12] gdb: use two displaced step buffers on amd64/Linux Simon Marchi
2020-11-25 1:42 ` Pedro Alves
2020-11-25 6:26 ` Simon Marchi
2020-11-25 20:07 ` Simon Marchi
2020-11-25 20:56 ` Simon Marchi
2020-11-26 21:43 ` Simon Marchi
2020-11-26 22:34 ` Simon Marchi
2020-11-28 18:56 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd587c56-281b-7581-fe54-2c3c492508e2@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).