binutils-gdb/gdb/common
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
..
agent.c Simple -Wshadow=local fixes 2018-10-04 22:51:45 -06:00
agent.h Get rid of -Wodr warning (PR build/23399) 2018-08-28 17:23:16 -04:00
array-view.h Add selftests for range_contains and insert_into_bit_range_vector 2018-04-09 15:47:12 -04:00
ax.def
break-common.h
btrace-common.c Remove cleanups from btrace code 2018-06-08 07:05:49 -06:00
btrace-common.h Remove cleanups from btrace code 2018-06-08 07:05:49 -06:00
buffer.c
buffer.h
byte-vector.h Make target_read_alloc & al return vectors 2018-04-07 13:19:12 -04:00
cleanups.c
cleanups.h
common-debug.c
common-debug.h
common-defs.h Define _FORTIFY_SOURCE in common-defs.h 2018-08-13 10:02:00 -06:00
common-exceptions.c
common-exceptions.h Mark END_CATCH as ATTRIBUTE_NORETURN (-Wmaybe-uninitialized warnings) 2018-05-30 14:18:47 +01:00
common-gdbthread.h
common-inferior.h
common-regcache.c
common-regcache.h Add regcache raw_compare method 2018-06-11 10:09:30 +01:00
common-types.h Avoid -Wnarrowing warnings in struct tramp_frame instances 2018-08-27 12:00:10 -06:00
common-utils.c Move 'is_regular_file' from common-utils.c to filestuff.c 2018-09-12 13:58:30 -04:00
common-utils.h Move 'is_regular_file' from common-utils.c to filestuff.c 2018-09-12 13:58:30 -04:00
common.host
common.m4
create-version.sh
def-vector.h
default-init-alloc.h
enum-flags.h Use unsigned as base type for some enums 2018-10-03 15:19:06 -06:00
environ.c
environ.h
errors.c
errors.h
fileio.c
fileio.h
filestuff.c Move 'is_regular_file' from common-utils.c to filestuff.c 2018-09-12 13:58:30 -04:00
filestuff.h Move 'is_regular_file' from common-utils.c to filestuff.c 2018-09-12 13:58:30 -04:00
format.c Make format_pieces recognize the \e escape sequence 2018-05-17 13:06:11 -04:00
format.h Make format_pieces recognize the \e escape sequence 2018-05-17 13:06:11 -04:00
function-view.h
gdb_assert.h
gdb_locale.h
gdb_optional.h
gdb_proc_service.h Move duplicated code to common/gdb_proc_service.h 2018-10-01 10:37:39 +01:00
gdb_ref_ptr.h Introduce ref_ptr::new_reference 2018-04-30 11:33:11 -06:00
gdb_setjmp.h
gdb_signals.h
gdb_splay_tree.h
gdb_string_view.h Add gdb::string_view 2018-04-09 14:20:46 -04:00
gdb_string_view.tcc Add gdb::string_view 2018-04-09 14:20:46 -04:00
gdb_sys_time.h
gdb_tilde_expand.c
gdb_tilde_expand.h
gdb_unique_ptr.h
gdb_unlinker.h
gdb_vecs.c
gdb_vecs.h Remove const_char_ptr typedef 2018-05-29 08:52:55 -06:00
gdb_wait.h
hash_enum.h
host-defs.h
job-control.c
job-control.h
mingw-strerror.c
netstuff.c Implement IPv6 support for GDB/gdbserver 2018-07-11 19:41:31 -04:00
netstuff.h Implement IPv6 support for GDB/gdbserver 2018-07-11 19:41:31 -04:00
new-op.c
observable.h
offset-type.h
pathstuff.c Add "const" to a few locals in gdb 2018-09-24 06:17:13 -06:00
pathstuff.h Update get_standard_cache_dir for macOS 2018-09-17 08:43:12 -06:00
poison.h Introduce obstack_new, poison other "typed" obstack functions 2018-05-20 21:06:36 -04:00
posix-strerror.c
preprocessor.h
print-utils.c
print-utils.h
ptid.c Remove ptid_equal 2018-07-03 11:36:46 -06:00
ptid.h Remove ptid_equal 2018-07-03 11:36:46 -06:00
queue.h
refcounted-object.h Use thread_info and inferior pointers more throughout 2018-06-21 17:09:31 +01:00
rsp-low.c
rsp-low.h
run-time-clock.c
run-time-clock.h
scoped_fd.h Don't check HAVE_UNISTD_H 2018-10-01 02:58:23 -06:00
scoped_mmap.c Mark more file descriptors close-on-exec 2018-09-23 12:11:16 -06:00
scoped_mmap.h Introduce mmap_file function 2018-08-07 18:10:29 -04:00
scoped_restore.h
selftest.c
selftest.h
signals-state-save-restore.c
signals-state-save-restore.h
signals.c
symbol.h
tdesc.c Simple unused variable removals 2018-07-22 13:20:01 -06:00
tdesc.h Remove xml file references from target descriptions 2018-04-18 20:49:37 +01:00
traits.h Fix copy-pasto, allocate objfile_per_bfd_storage with obstack_new 2018-05-20 23:19:35 -04:00
underlying.h
valid-expr.h
vec.c
vec.h
version.h
x86-xstate.h gdb/x86: Handle kernels using compact xsave format 2018-05-08 18:03:46 +01:00
xml-utils.c
xml-utils.h