+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * linux-tdep.c (struct smaps_vmflags) <memory_tagging>: New flag
+ bit.
+ (struct smaps_data): New struct.
+ (decode_vmflags): Handle the 'mt' flag.
+ (parse_smaps_data): New function, refactored from
+ linux_find_memory_regions_full.
+ (linux_address_in_memtag_page): New function.
+ (linux_find_memory_regions_full): Refactor into parse_smaps_data.
+ * linux-tdep.h (linux_address_in_memtag_page): New prototype.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * linux-tdep.c (linux_find_memory_regions_full): Use std::string
+ instead of char arrays.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * Makefile.in (ALL_64_TARGET_OBS): Add arch/aarch64-mte-linux.o.
+ (HFILES_NO_SRCDIR): Add arch/aarch64-mte-linux.h and
+ nat/aarch64-mte-linux-ptrace.h.
+ * aarch64-linux-nat.c: Include nat/aarch64-mte-linux-ptrace.h.
+ (aarch64_linux_nat_target) <supports_memory_tagging>: New method
+ override.
+ <fetch_memtags>: New method override.
+ <store_memtags>: New method override.
+ (aarch64_linux_nat_target::supports_memory_tagging): New method.
+ (aarch64_linux_nat_target::fetch_memtags): New method.
+ (aarch64_linux_nat_target::store_memtags): New method.
+ * arch/aarch64-mte-linux.c: New file.
+ * arch/aarch64-mte-linux.h: Include gdbsupport/common-defs.h.
+ (AARCH64_MTE_GRANULE_SIZE): Define.
+ (aarch64_memtag_type): New enum.
+ (aarch64_mte_get_tag_granules): New prototype.
+ * configure.nat (NATDEPFILES): Add nat/aarch64-mte-linux-ptrace.o.
+ * configure.tgt (aarch64*-*-linux*): Add arch/aarch64-mte-linux.o.
+ * nat/aarch64-mte-linux-ptrace.c: New file.
+ * nat/aarch64-mte-linux-ptrace.h: New file.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * Makefile.in (HFILES_NO_SRCDIR): Add nat/aarch64-mte-linux-ptrace.h.
+ * nat/aarch64-mte-linux-ptrace.h: New file.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * aarch64-linux-nat.c (fetch_mteregs_from_thread): New function.
+ (store_mteregs_to_thread): New function.
+ (aarch64_linux_nat_target::fetch_registers): Update to call
+ fetch_mteregs_from_thread.
+ (aarch64_linux_nat_target::store_registers): Update to call
+ store_mteregs_to_thread.
+ * aarch64-tdep.c (aarch64_mte_register_names): New struct.
+ (aarch64_cannot_store_register): Handle MTE registers.
+ (aarch64_gdbarch_init): Initialize and setup MTE registers.
+ * aarch64-tdep.h (gdbarch_tdep) <mte_reg_base>: New field.
+ <has_mte>: New method.
+ * arch/aarch64-linux.h (AARCH64_LINUX_SIZEOF_MTE): Define.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * aarch64-linux-nat.c
+ (aarch64_linux_nat_target::read_description): Take MTE flag into
+ account.
+ Slight refactor to hwcap flag checking.
+ * aarch64-linux-tdep.c
+ (aarch64_linux_core_read_description): Likewise.
+ * aarch64-tdep.c (tdesc_aarch64_list): Add one more dimension for
+ MTE.
+ (aarch64_read_description): Add mte_p parameter and update to use it.
+ Update the documentation.
+ (aarch64_gdbarch_init): Update call to aarch64_read_description.
+ * aarch64-tdep.h (aarch64_read_description): Add mte_p parameter.
+ * arch/aarch64.c: Include ../features/aarch64-mte.c.
+ (aarch64_create_target_description): Add mte_p parameter and update
+ the code to use it.
+ * arch/aarch64.h (aarch64_create_target_description): Add mte_p
+ parameter.
+ * features/Makefile (FEATURE_XMLFILES): Add aarch64-mte.xml.
+ * features/aarch64-mte.c: New file, generated.
+ * features/aarch64-mte.xml: New file.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * Makefile.in (HFILES_NO_SRCDIR): Add arch/aarch64-mte-linux.h.
+ * aarch64-linux-nat.c: Include arch/aarch64-mte-linux.h.
+ * aarch64-linux-tdep.c: Likewise
+ * arch/aarch64-mte-linux.h: New file.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * remote: Include gdbsupport/selftest.h.
+ (test_memory_tagging_functions): New function.
+ (_initialize_remote): Register test_memory_tagging_functions.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * remote.c (PACKET_memory_tagging_feature): New enum.
+ (remote_memory_tagging_p): New function.
+ (remote_protocol_features): New "memory-tagging" entry.
+ (remote_target::remote_query_supported): Handle memory tagging
+ support.
+ (remote_target::supports_memory_tagging): Implement.
+ (create_fetch_memtags_request, parse_fetch_memtags_reply)
+ (create_store_memtags_request): New functions.
+ (remote_target::fetch_memtags): Implement.
+ (remote_target::store_memtags): Implement.
+ (_initialize_remote): Add new "memory-tagging-feature"
+ config command.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * arch-utils.c (default_memtag_to_string, default_tagged_address_p)
+ (default_memtag_matches_p, default_set_memtags)
+ (default_get_memtag): New functions.
+ * arch-utils.h (default_memtag_to_string, default_tagged_address_p)
+ (default_memtag_matches_p, default_set_memtags)
+ (default_get_memtag): New prototypes.
+ * gdbarch.c: Regenerate.
+ * gdbarch.h: Regenerate.
+ * gdbarch.sh (memtag_to_string, tagged_address_p, memtag_matches_p)
+ (set_memtags, get_memtag, memtag_granule_size): New gdbarch hooks.
+ (enum memtag_type): New enum.
+
+2021-03-24 Luis Machado <luis.machado@linaro.org>
+
+ * remote.c (remote_target) <supports_memory_tagging>: New method
+ override.
+ <fetch_memtags>: New method override.
+ <store_memtags>: New method override.
+ (remote_target::supports_memory_tagging): New method.
+ (remote_target::fetch_memtags): New method.
+ (remote_target::store_memtags): New method.
+ * target-delegates.c: Regenerate.
+ * target.h (struct target_ops) <supports_memory_tagging>: New virtual
+ method.
+ <fetch_memtags>: New virtual method.
+ <store_memtags>: New virtual method.
+ (target_supports_memory_tagging): Define.
+ (target_fetch_memtags): Define.
+ (target_store_memtags): Define.
+ * target-debug.h (target_debug_print_size_t)
+ (target_debug_print_const_gdb_byte_vector_r)
+ (target_debug_print_gdb_byte_vector_r): New functions.
+
+2021-03-23 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * target.h (target_longname): Remove.
+
+2021-03-23 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * target.h (target_is_pushed): Remove, update callers to use
+ inferior::target_is_pushed instead.
+ * target.c (target_is_pushed): Remove.
+
+2021-03-23 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * target.h (push_target): Remove, update callers to use
+ inferior::push_target.
+ * target.c (push_target): Remove.
+ * inferior.h (class inferior) <push_target>: New overload.
+
+2021-03-23 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * target.h (unpush_target): Remove, update all callers
+ to use `inferior::unpush_target` instead.
+ (struct target_unpusher) <operator()>: Just declare.
+ * target.c (unpush_target): Remove.
+ (target_unpusher::operator()): New.
+
+2021-03-22 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * dwarf2/read.c (process_psymtab_comp_unit): Replace abort with an
+ error.
+ (process_full_comp_unit): Validate the top-level tag before
+ processing the first DIE.
+ (read_func_scope): Ensure we have a valid builder.
+
+2021-03-22 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * objc-lang.c (objc_demangle): Renamed to
+ objc_language::demangle_symbol, and moved later in the file.
+ (objc_language::sniff_from_mangled_name): Call demangle_symbol
+ member function.
+ (objc_language::demangle_symbol): Defined outside of class
+ declaration. The definition is the old objc_demangle with NULL
+ changed to nullptr, and if conditions relating to nullptr pointers
+ or null character checks made explicit.
+ * objc-lang.h (objc_demangle): Delete declaration.
+
+2021-03-22 Martin Liska <mliska@suse.cz>
+
+ * arm-tdep.c (show_disassembly_style_sfunc): Replace usage of CONST_STRNEQ with startswith.
+ (_initialize_arm_tdep): Likewise.
+
+2021-03-20 Tom Tromey <tom@tromey.com>
+
+ * xcoffread.c (xcoff_initial_scan): Create partial symtabs.
+ * symfile.c (syms_from_objfile_1, reread_symbols): Update.
+ * psymtab.h (make_psymbol_functions): Don't declare.
+ * psymtab.c (make_psymbol_functions): Remove.
+ (maintenance_print_psymbols): Update.
+ * psympriv.h (struct psymbol_functions): Add no-argument
+ constructor.
+ * objfiles.h (struct objfile) <reset_psymtabs>: Remove.
+ <partial_symtabs>: Remove.
+ * mdebugread.c (mdebug_build_psymtabs): Create partial symtabs.
+ * elfread.c (read_partial_symbols): Update.
+ (elf_symfile_read): Remove check for existing partial symbols.
+ Don't clear "qf".
+ * dwarf2/read.c (dwarf2_has_info): Remove check for existing
+ partial symbols.
+ (dwarf2_build_psymtabs): Add psymbol_functions parameter. Create
+ partial symtabs.
+ * dwarf2/public.h (dwarf2_build_psymtabs): Add psymbol_functions
+ parameter.
+ * dbxread.c (dbx_symfile_read): Create partial symtabs.
+ * ctfread.c (elfctf_build_psymtabs): Create partial symtabs.
+
+2021-03-20 Tom Tromey <tom@tromey.com>
+
+ * dwarf2/read.c (dwarf2_build_psymtabs): Update.
+ * symfile.c (syms_from_objfile_1, reread_symbols): Update.
+ * symfile-debug.c (objfile::has_partial_symbols)
+ (objfile::find_last_source_symtab)
+ (objfile::forget_cached_source_info)
+ (objfile::map_symtabs_matching_filename, objfile::lookup_symbol)
+ (objfile::print_stats, objfile::dump)
+ (objfile::expand_symtabs_for_function)
+ (objfile::expand_all_symtabs)
+ (objfile::expand_symtabs_with_fullname)
+ (objfile::map_matching_symbols)
+ (objfile::expand_symtabs_matching)
+ (objfile::find_pc_sect_compunit_symtab)
+ (objfile::map_symbol_filenames)
+ (objfile::find_compunit_symtab_by_address)
+ (objfile::lookup_global_symbol_language)
+ (objfile::require_partial_symbols): Update.
+ * psymtab.c (maintenance_print_psymbols)
+ (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
+ * objfiles.h (struct objfile) <qf>: Now a forward_list.
+ * objfiles.c (objfile_relocate1): Update.
+ * elfread.c (elf_symfile_read): Update.
+
+2021-03-20 Tom Tromey <tom@tromey.com>
+
+ * objfiles.h (struct objfile) <psymtabs>: Remove method.
+
+2021-03-20 Tom Tromey <tom@tromey.com>
+
+ * psymtab.c (psymbol_functions::count_psyms): Rename.
+ (psymbol_functions::print_stats): Update.
+ * psympriv.h (struct psymbol_functions) <count_psyms>: Declare
+ method.
+
+2021-03-20 Tom Tromey <tom@tromey.com>
+
+ * psymtab.c (psymbol_functions::require_partial_symbols): Rename.
+ (psymbol_functions::find_pc_sect_psymtab): Rename.
+ (psymbol_functions::find_pc_sect_compunit_symtab)
+ (maintenance_print_psymbols, maintenance_check_psymtabs): Update.
+ * psympriv.h (struct psymbol_functions) <require_partial_symbols>:
+ Declare new method.
+ <get_partial_symtabs, find_pc_sect_psymtab>: Likewise.
+
+2021-03-20 Tom Tromey <tom@tromey.com>
+
+ * xcoffread.c (xcoff_start_psymtab): Add partial_symtabs parameter.
+ (xcoff_end_psymtab, scan_xcoff_symtab): Update.
+ * psymtab.c (partial_symtab::partial_symtab): Add partial_symtabs
+ parameter.
+ (add_psymbol_to_bcache): Remove.
+ (partial_symtab::add_psymbol): Add partial_symtabs parameter.
+ (partial_symtab::add_psymbol, partial_symtab::partial_symtab):
+ Likewise.
+ * psympriv.h (partial_symtab): Add partial_symtabs parameter.
+ <add_psymbol>: Likewise.
+ (standard_psymtab, legacy_psymtab): Likewise.
+ * mdebugread.c (parse_partial_symbols): Update.
+ (handle_psymbol_enumerators): Add partial_symtabs parameter.
+ (handle_psymbol_enumerators): Update.
+ (new_psymtab): Add partial_symtabs parameter.
+ * dwarf2/read.h (dwarf2_psymtab): Add partial_symtabs parameter.
+ * dwarf2/read.c (dwarf2_include_psymtab): Add partial_symtabs
+ parameter.
+ (dwarf2_create_include_psymtab): Add partial_symtabs parameter.
+ (create_partial_symtab, add_partial_symbol, dwarf_decode_lines):
+ Update.
+ * dbxread.c (read_dbx_symtab): Update.
+ (start_psymtab): Add partial_symtabs parameter.
+ (dbx_end_psymtab): Update.
+ * ctfread.c (struct ctf_context) <partial_symtabs>: New member.
+ (ctf_psymtab): Add partial_symtabs parameter.
+ (create_partial_symtab, ctf_psymtab_type_cb, ctf_psymtab_var_cb):
+ Update.
+ (scan_partial_symbols): Add partial_symtabs parameter.
+ (scan_partial_symbols, elfctf_build_psymtabs)
+ (ctf_psymtab_add_enums): Update.
+
+2021-03-20 Tom Tromey <tom@tromey.com>
+
+ * symfile.c (read_symbols): Use objfile method.
+ * symfile-debug.c (objfile::require_partial_symbols): New method.
+ * psymtab.h (require_partial_symbols): Don't declare.
+ * psymtab.c (require_partial_symbols): Use objfile method. Now
+ static.
+ (psymbol_functions::map_symtabs_matching_filename, OBJFILE)
+ (psymbol_functions::lookup_symbol)
+ (psymbol_functions::lookup_global_symbol_language)
+ (psymbol_functions::find_last_source_symtab)
+ (psymbol_functions::forget_cached_source_info)
+ (psymbol_functions::print_stats)
+ (psymbol_functions::expand_symtabs_for_function)
+ (psymbol_functions::expand_all_symtabs)
+ (psymbol_functions::expand_symtabs_with_fullname)
+ (psymbol_functions::map_symbol_filenames)
+ (psymbol_functions::map_matching_symbols)
+ (psymbol_functions::expand_symtabs_matching)
+ (psymbol_functions::find_compunit_symtab_by_address)
+ (maintenance_print_psymbols, maintenance_info_psymtabs)
+ (maintenance_check_psymtabs): Update.
+ * objfiles.h (struct objfile) <require_partial_symbols>: Declare
+ new method.
+
+2021-03-20 Tom Tromey <tom@tromey.com>
+
+ * xcoffread.c (xcoff_sym_fns): Update.
+ * symfile.h (struct sym_fns) <sym_read_psymbols>: Remove.
+ * symfile-debug.c (objfile::has_partial_symbols): Use
+ can_lazily_read_symbols.
+ (debug_sym_read_psymbols): Remove.
+ (debug_sym_fns, install_symfile_debug_logging): Update.
+ * quick-symbol.h (struct quick_symbol_functions)
+ <can_lazily_read_symbols, read_partial_symbols>: New methods.
+ * psymtab.c (require_partial_symbols): Use new 'qf' methods.
+ * mipsread.c (ecoff_sym_fns): Update.
+ * machoread.c (macho_sym_fns): Update.
+ * elfread.c (struct lazy_dwarf_reader): New.
+ (elf_symfile_read): Update.
+ (read_psyms): Now a method of lazy_dwarf_reader.
+ (elf_sym_fns): Update.
+ (elf_sym_fns_lazy_psyms): Remove.
+ * dbxread.c (aout_sym_fns): Update.
+ * coffread.c (coff_sym_fns): Update.
+
2021-03-20 Tom Tromey <tom@tromey.com>
* symfile.c (syms_from_objfile_1): Call reset_psymtabs.