binutils-gdb/gdb/nat
Tom Tromey b926417afa Simple -Wshadow=local fixes
This fixes all the straightforward -Wshadow=local warnings in gdb.  A
few standard approaches are used here:

* Renaming an inner (or outer, but more commonly inner) variable;
* Lowering a declaration to avoid a clash;
* Moving a declaration into a more inner scope to avoid a clash,
  including the special case of moving a declaration into a loop header.

I did not consider any of the changes in this patch to be particularly
noteworthy, though of course they should all still be examined.

gdb/ChangeLog
2018-10-04  Tom Tromey  <tom@tromey.com>

	* ctf.c (SET_ARRAY_FIELD): Rename "u32".
	* p-valprint.c (pascal_val_print): Split inner "i" variable.
	* xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
	header.
	* xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
	more inner scope.
	* xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
	* varobj.c (varobj_update): Rename inner "newobj",
	"type_changed".
	* valprint.c (generic_emit_char): Rename inner "buf".
	* valops.c (find_overload_match): Rename inner "temp".
	(value_struct_elt_for_reference): Declare "v" in more inner
	scope.
	* v850-tdep.c (v850_push_dummy_call): Rename "len".
	* unittests/array-view-selftests.c (run_tests): Rename inner
	"vec".
	* tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
	header.
	* tracepoint.c (merge_uploaded_trace_state_variables): Declare
	"tsv" in more inner scope.
	(print_one_static_tracepoint_marker): Rename inner
	"tuple_emitter".
	* tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
	(tic6x_push_dummy_call): Don't redeclare "addr".
	* target-float.c: Declare "dto" lower.
	* symtab.c (lookup_local_symbol): Rename inner "sym".
	(find_pc_sect_line): Rename inner "pc".
	* stack.c (print_frame): Don't redeclare "gdbarch".
	(return_command): Rename inner "gdbarch".
	* s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
	"sp".
	* rust-lang.c (rust_internal_print_type): Declare "i" in loop
	header.
	* rs6000-tdep.c (ppc_process_record): Rename inner "addr".
	* riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
	scope.
	* remote.c (remote_target::update_thread_list): Don't redeclare
	"tp".
	(remote_target::process_initial_stop_replies): Rename inner
	"thread".
	(remote_target::remote_parse_stop_reply): Don't redeclare "p".
	(remote_target::wait_as): Don't redeclare "stop_reply".
	(remote_target::get_thread_local_address): Rename inner
	"result".
	(remote_target::get_tib_address): Likewise.
2018-10-04 22:51:45 -06:00
..
aarch64-linux-hw-point.c Remove ptid_get_lwp 2018-07-03 11:36:43 -06:00
aarch64-linux-hw-point.h aarch64: PR 19806: watchpoints: false negatives + PR 20207 contiguous ones 2018-05-04 22:26:46 +02:00
aarch64-linux.c Remove ptid_get_lwp 2018-07-03 11:36:43 -06:00
aarch64-linux.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
aarch64-sve-linux-ptrace.c Remove some unused variables 2018-07-22 23:23:11 -04:00
aarch64-sve-linux-ptrace.h Fix up HAS_SVE_STATE macro 2018-06-22 12:01:18 +01:00
aarch64-sve-linux-sigcontext.h Add Aarch64 SVE compatibility macros 2018-06-18 10:02:56 +01:00
amd64-linux-siginfo.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
amd64-linux-siginfo.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
fork-inferior.c Make variable in get_startup_shell non-static 2018-09-14 06:49:13 -06:00
fork-inferior.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_ptrace.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb_thread_db.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
glibc_thread_db.h Move shared native target specific code to gdb/nat 2014-06-20 14:06:48 +01:00
linux-btrace.c Remove ptid_get_lwp 2018-07-03 11:36:43 -06:00
linux-btrace.h btrace, gdbserver: remove the to_supports_btrace target method 2018-02-09 14:03:20 +01:00
linux-namespaces.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
linux-namespaces.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
linux-nat.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
linux-osdata.c Simple -Wshadow=local fixes 2018-10-04 22:51:45 -06:00
linux-osdata.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
linux-personality.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
linux-personality.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
linux-procfs.c Warn if /proc is not accessible 2018-07-04 16:13:29 +01:00
linux-procfs.h Warn if /proc is not accessible 2018-07-04 16:13:29 +01:00
linux-ptrace.c gdb: Fix ia64 defining TRAP_HWBKPT before including gdb_wait.h 2018-01-19 18:17:54 +00:00
linux-ptrace.h Fix Alpha native GDB build 2018-05-31 11:18:35 -04:00
linux-waitpid.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
linux-waitpid.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
mips-linux-watch.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
mips-linux-watch.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ppc-linux.c [PowerPC] Consolidate wordsize getter between native and gdbserver 2018-05-22 11:52:02 -03:00
ppc-linux.h [PowerPC] Consolidate wordsize getter between native and gdbserver 2018-05-22 11:52:02 -03:00
x86-cpuid.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
x86-dregs.c Fix "fall through" comments 2018-05-04 22:04:46 -06:00
x86-dregs.h Implement "to_stopped_by_hw_breakpoint" for x86 debug registers. 2018-03-03 21:25:33 -08:00
x86-gcc-cpuid.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
x86-linux-dregs.c Remove ptid_lwp_p 2018-07-03 11:36:45 -06:00
x86-linux-dregs.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
x86-linux.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
x86-linux.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00