diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-12-04 16:43:53 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-12-04 16:43:53 -0500 |
commit | 28d5518b12119eaf087c64fe25e31d2f49e53485 (patch) | |
tree | 729974cc7c7c46b7bd834fb3a75102f350b20e54 /gdb/thread.c | |
parent | f5f01699643e923edf7d0c661e330ceff609fac5 (diff) | |
download | binutils-28d5518b12119eaf087c64fe25e31d2f49e53485.zip binutils-28d5518b12119eaf087c64fe25e31d2f49e53485.tar.gz binutils-28d5518b12119eaf087c64fe25e31d2f49e53485.tar.bz2 |
gdb: rename things related to step over chains
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
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 32d14e8..2bbb016 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -205,9 +205,9 @@ clear_thread_inferior_resources (struct thread_info *tp) static void set_thread_exited (thread_info *tp, bool silent) { - /* Dead threads don't need to step-over. Remove from queue. */ + /* Dead threads don't need to step-over. Remove from chain. */ if (tp->step_over_next != NULL) - thread_step_over_chain_remove (tp); + global_thread_step_over_chain_remove (tp); if (tp->state != THREAD_EXITED) { @@ -365,7 +365,7 @@ step_over_chain_enqueue (struct thread_info **list_p, struct thread_info *tp) /* Remove TP from step-over chain LIST_P. */ static void -step_over_chain_remove (struct thread_info **list_p, struct thread_info *tp) +thread_step_over_chain_remove (struct thread_info **list_p, struct thread_info *tp) { gdb_assert (tp->step_over_next != NULL); gdb_assert (tp->step_over_prev != NULL); @@ -386,11 +386,11 @@ step_over_chain_remove (struct thread_info **list_p, struct thread_info *tp) /* See gdbthread.h. */ struct thread_info * -thread_step_over_chain_next (struct thread_info *tp) +global_thread_step_over_chain_next (struct thread_info *tp) { struct thread_info *next = tp->step_over_next; - return (next == step_over_queue_head ? NULL : next); + return (next == global_thread_step_over_chain_head ? NULL : next); } /* See gdbthread.h. */ @@ -404,17 +404,17 @@ thread_is_in_step_over_chain (struct thread_info *tp) /* See gdbthread.h. */ void -thread_step_over_chain_enqueue (struct thread_info *tp) +global_thread_step_over_chain_enqueue (struct thread_info *tp) { - step_over_chain_enqueue (&step_over_queue_head, tp); + step_over_chain_enqueue (&global_thread_step_over_chain_head, tp); } /* See gdbthread.h. */ void -thread_step_over_chain_remove (struct thread_info *tp) +global_thread_step_over_chain_remove (struct thread_info *tp) { - step_over_chain_remove (&step_over_queue_head, tp); + thread_step_over_chain_remove (&global_thread_step_over_chain_head, tp); } /* Delete the thread referenced by THR. If SILENT, don't notify @@ -805,7 +805,7 @@ set_running_thread (struct thread_info *tp, bool running) the step-over queue, so that we don't try to resume it until the user wants it to. */ if (tp->step_over_next != NULL) - thread_step_over_chain_remove (tp); + global_thread_step_over_chain_remove (tp); } return started; |