binutils-gdb/gdb/python
Tom Tromey 582942f456 More block constification
I noticed that there are still many places referring to non-const
blocks.  This constifies all the remaining ones that I found that
could be constified.

In a few spots, this search found unused variables or fields.  I
removed these.  I've also removed some unnecessary casts to
"struct block *".

gdb/ChangeLog
2019-03-24  Tom Tromey  <tom@tromey.com>

	* c-exp.y (typebase): Remove casts.
	* gdbtypes.c (lookup_unsigned_typename, )
	(lookup_signed_typename): Remove cast.
	* eval.c (parse_to_comma_and_eval): Remove cast.
	* parse.c (write_dollar_variable): Remove cast.
	* block.h (struct block) <superblock>: Now const.
	* symfile-debug.c (debug_qf_map_matching_symbols): Update.
	* psymtab.c (psym_map_matching_symbols): Make "block" const.
	(map_block): Make "block" const.
	* symfile.h (struct quick_symbol_functions)
	<map_matching_symbols>: Constify block argument to "callback".
	* symtab.c (basic_lookup_transparent_type_quick): Make "block"
	const.
	(find_pc_sect_compunit_symtab): Make "b" const.
	(find_symbol_at_address): Likewise.
	(search_symbols): Likewise.
	* dwarf2read.c (dw2_lookup_symbol): Make "block" const.
	(dw2_debug_names_lookup_symbol): Likewise.
	(dw2_map_matching_symbols): Update.
	* p-valprint.c (pascal_val_print): Remove "block".
	* ada-lang.c (ada_add_global_exceptions): Make "b" const.
	(aux_add_nonlocal_symbols): Make "block" const.
	(resolve_subexp): Remove cast.
	* linespec.c (iterate_over_all_matching_symtabs): Make "block"
	const.
	(iterate_over_file_blocks): Likewise.
	* f-exp.y (%union) <bval>: Remove.
	* coffread.c (patch_opaque_types): Make "b" const.
	* spu-tdep.c (spu_catch_start): Make "block" const.
	* c-valprint.c (print_unpacked_pointer): Remove "block".
	* symmisc.c (dump_symtab_1): Make "b" const.
	(block_depth): Make "block" const.
	* d-exp.y (%union) <bval>: Remove.
	* cp-support.h (cp_lookup_rtti_type): Update.
	* cp-support.c (cp_lookup_rtti_type): Make "block" const.
	* psymtab.c (psym_lookup_symbol): Make "block" const.
	(maintenance_check_psymtabs): Make "b" const.
	* python/py-framefilter.c (extract_sym): Make "sym_block" const.
	(enumerate_locals, enumerate_args): Update.
	* python/py-symtab.c (stpy_global_block): Make "block" const.
	(stpy_static_block): Likewise.
	* inline-frame.c (block_starting_point_at): Make "new_block"
	const.
	* block.c (find_block_in_blockvector): Make return type const.
	(blockvector_for_pc_sect): Make "b" const.
	(find_block_in_blockvector): Make "b" const.
2019-03-24 23:32:08 -06:00
..
lib/gdb Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-all-events.def Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-arch.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-auto-load.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-block.c Remove duplicate or commented-out #includes 2019-01-21 11:14:07 -07:00
py-bpevent.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-breakpoint.c Remove Python 2.4 and 2.5 support 2019-02-27 11:43:06 -07:00
py-cmd.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-continueevent.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-event-types.def Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-event.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-event.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
py-events.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
py-evtregistry.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-evts.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-exitedevent.c Change inferior_to_inferior_object to return a gdbpy_ref 2019-01-02 16:28:33 -07:00
py-finishbreakpoint.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-frame.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-framefilter.c More block constification 2019-03-24 23:32:08 -06:00
py-function.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-gdb-readline.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-inferior.c Remove Python 2.4 and 2.5 support 2019-02-27 11:43:06 -07:00
py-infevents.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-infthread.c Change inferior_to_inferior_object to return a gdbpy_ref 2019-01-02 16:28:33 -07:00
py-instruction.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-instruction.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
py-lazy-string.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-linetable.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-newobjfileevent.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-objfile.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-param.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-prettyprint.c Remove some Python 3 #ifs 2019-03-05 15:01:59 -07:00
py-progspace.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-record-btrace.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-record-btrace.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
py-record-full.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-record-full.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
py-record.c Simplify gdbpy_stop_recording 2019-01-03 14:49:18 -07:00
py-record.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
py-ref.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
py-signalevent.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-stopevent.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-stopevent.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00
py-symbol.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-symtab.c More block constification 2019-03-24 23:32:08 -06:00
py-threadevent.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
py-type.c Remove Python 2.4 and 2.5 support 2019-02-27 11:43:06 -07:00
py-unwind.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-utils.c Remove some Python 3 #ifs 2019-03-05 15:01:59 -07:00
py-value.c gdb: Move value_from_host_double into value.c and make more use of it 2019-03-07 14:53:37 +00:00
py-varobj.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
py-xmethods.c Do not include py-ref.h in most files 2019-01-22 20:35:21 -07:00
python-config.py
python-internal.h Remove Python 2.4 and 2.5 support 2019-02-27 11:43:06 -07:00
python.c Remove Python 2.4 and 2.5 support 2019-02-27 11:43:06 -07:00
python.h Normalize include guards in gdb 2019-02-07 03:27:23 -07:00