summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/gdbthread.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-04-22 10:50:27 -0600
committerTom Tromey <tom@tromey.com>2018-10-04 22:51:46 -0600
commitda4ae14a4d1614015f6e8d4a37df1b882806630a (patch)
treeeb3dd1793d968b1cbbfd89649eb84e749dab9ec3 /gdb/gdbserver/gdbthread.h
parentb926417afaea99ed17663e06d6654d0048536017 (diff)
downloadbinutils-gdb-da4ae14a4d1614015f6e8d4a37df1b882806630a.tar.gz
Avoid shadowing in gdbserver
This fixes a few instances of shadowing in gdbserver. These are all simple fixes. gdb/gdbserver/ChangeLog 2018-10-04 Tom Tromey <tom@tromey.com> * server.c (handle_status): Rename inner "thread". (process_serial_event): Declare "res" in 'm' case. * linux-low.c (last_thread_of_process_p, find_lwp_pid) (iterate_over_lwps): Rename inner "thread". (linux_qxfer_libraries_svr4): Rename inner "len". * gdbthread.h (find_thread_in_random): Rename inner "thread".
Diffstat (limited to 'gdb/gdbserver/gdbthread.h')
-rw-r--r--gdb/gdbserver/gdbthread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbserver/gdbthread.h b/gdb/gdbserver/gdbthread.h
index 0edf870c56f..03ace2ee16d 100644
--- a/gdb/gdbserver/gdbthread.h
+++ b/gdb/gdbserver/gdbthread.h
@@ -188,8 +188,8 @@ find_thread_in_random (Func func)
random_selector = (int)
((count * (double) rand ()) / (RAND_MAX + 1.0));
- thread_info *thread = find_thread ([&] (thread_info *thread) {
- return func (thread) && (random_selector-- == 0);
+ thread_info *thread = find_thread ([&] (thread_info *thr_arg) {
+ return func (thr_arg) && (random_selector-- == 0);
});
gdb_assert (thread != NULL);