1. 17 Jan, 2019 1 commit
    • Tom Tromey's avatar
      Replace "the the" with "the" · 6471e7d2
      Tom Tromey authored
      This replaces "the the" with "the" in various comments.
      Tested by rebuilding.  This didn't test the solib-dsbt.c change, but
      it looks harmless.
      2019-01-17  Tom Tromey  <tromey@bapiya>
      	* valprint.c: Replace "the the" with "the".
      	* symtab.c: Replace "the the" with "the".
      	* solib.c: Replace "the the" with "the".
      	* solib-dsbt.c: Replace "the the" with "the".
      	* linespec.c: Replace "the the" with "the".
      	* dwarf2loc.h: Replace "the the" with "the".
      	* amd64-windows-tdep.c: Replace "the the" with "the".
      	* aarch64-tdep.c: Replace "the the" with "the".
  2. 01 Jan, 2019 1 commit
    • Joel Brobecker's avatar
      Update copyright year range in all GDB files. · 42a4f53d
      Joel Brobecker authored
      This commit applies all changes made after running the gdb/copyright.py
      Note that one file was flagged by the script, due to an invalid
      copyright header
      As the file was copied from GCC's libstdc++-v3 testsuite, this commit
      leaves this file untouched for the time being; a patch to fix the header
      was sent to gcc-patches first.
      	Update copyright year range in all GDB files.
  3. 16 Nov, 2018 2 commits
    • Alan Hayward's avatar
      Aarch64: Fix segfault when casting dummy calls · 38a72da0
      Alan Hayward authored
      The following will segfault on aarch64 if foo is in another object,
      was compiled as c++ and has no debug symbols:
      (gdb) p (int)foo()
      This is because aarch64_push_dummy_call determines the return type
      of the function and then does not check for null pointer.
      A null pointer for the return type means the call has no debug
      information.  For the code to get here, then the call must have
      been cast, otherwise we'd error out sooner.  In the case of a
      no-debug-info call cast, the return type is the type the user
      had cast the call to, but we do not have that information
      available here.
      However, aarch64_push_dummy_call only requires the return type in
      order to calculate lang_struct_return. This information is available
      in the return_method enum. The fix is to simply use this instead.
      Adds testcase to check calls across objects, with all combinations
      of c, c++, debug and no debug.
      	PR gdb/22736:
      	* aarch64-tdep.c (aarch64_push_dummy_call): Remove
      	lang_struct_return code.
      	PR gdb/22736:
      	* gdb.cp/infcall-nodebug-lib.c: New test.
      	* gdb.cp/infcall-nodebug-main.c: New test.
      	* gdb.cp/infcall-nodebug.exp: New file.
    • Alan Hayward's avatar
      Pass return_method to _push_dummy_call · cf84fa6b
      Alan Hayward authored
      	* aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
      	* alpha-tdep.c (alpha_push_dummy_call): Likewise.
      	* amd64-tdep.c (amd64_push_arguments): Likewise.
      	(amd64_push_dummy_call): Likewise.
      	* amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
      	* arc-tdep.c (arc_push_dummy_call): Likewise.
      	* arm-tdep.c (arm_push_dummy_call): Likewise.
      	* avr-tdep.c (avr_push_dummy_call): Likewise.
      	* bfin-tdep.c (bfin_push_dummy_call): Likewise.
      	* cris-tdep.c (cris_push_dummy_call): Likewise.
      	* csky-tdep.c (csky_push_dummy_call): Likewise.
      	* frv-tdep.c (frv_push_dummy_call): Likewise.
      	* gdbarch.c: Regenerate.
      	* gdbarch.h: Regenerate.
      	* gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
      	* h8300-tdep.c (h8300_push_dummy_call): Likewise.
      	* hppa-tdep.c (hppa32_push_dummy_call): Likewise.
      	(hppa64_push_dummy_call): Likewise.
      	* i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
      	* i386-tdep.c (i386_push_dummy_call): Likewise.
      	* ia64-tdep.c (ia64_push_dummy_call): Likewise.
      	* infcall.c (call_function_by_hand_dummy): Likewise.
      	* iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
      	* lm32-tdep.c (lm32_push_dummy_call): Likewise.
      	* m32c-tdep.c (m32c_push_dummy_call): Likewise.
      	* m32r-tdep.c (m32r_push_dummy_call): Likewise.
      	* m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
      	* m68k-tdep.c (m68k_push_dummy_call): Likewise.
      	* mep-tdep.c (mep_push_dummy_call): Likewise.
      	* mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
      	(mips_n32n64_push_dummy_call): Likewise.
      	(mips_o32_push_dummy_call): Likewise.
      	(mips_o64_push_dummy_call): Likewise.
      	* mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
      	* msp430-tdep.c (msp430_push_dummy_call): Likewise.
      	* nds32-tdep.c (nds32_push_dummy_call): Likewise.
      	* nios2-tdep.c (nios2_push_dummy_call): Likewise.
      	* or1k-tdep.c (or1k_push_dummy_call): Likewise.
      	* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
      	(ppc64_sysv_abi_push_dummy_call): Likewise.
      	* ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
      	(ppc64_sysv_abi_push_dummy_call): Likewise.
      	* riscv-tdep.c (riscv_push_dummy_call): Likewise.
      	* rl78-tdep.c (rl78_push_dummy_call): Likewise.
      	* rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
      	* rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
      	* rx-tdep.c (rx_push_dummy_call): Likewise.
      	* s390-tdep.c (s390_push_dummy_call): Likewise.
      	* score-tdep.c (score_push_dummy_call): Likewise.
      	* sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
      	(sh_push_dummy_call_nofpu): Likewise.
      	* sparc-tdep.c (sparc32_store_arguments): Likewise.
      	(sparc32_push_dummy_call): Likewise.
      	* sparc64-tdep.c (sparc64_store_arguments): Likewise.
      	(sparc64_push_dummy_call): Likewise.
      	* spu-tdep.c (spu_push_dummy_call): Likewise.
      	* tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
      	* tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
      	* v850-tdep.c (v850_push_dummy_call): Likewise.
      	* vax-tdep.c (vax_push_dummy_call): Likewise.
      	* xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
      	* xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
  4. 08 Nov, 2018 1 commit
    • Joel Brobecker's avatar
      (AArch64) wrong value returned by "finish" for HFA · d4718d5c
      Joel Brobecker authored
      Consider the gdb.ada/array_return.exp testcase, and in particular,
      consider the following code...
         type Small_Float_Vector is array (1 .. 2) of Float;
         function Create_Small_Float_Vector return Small_Float_Vector is
            return (others => 4.25);
         end Create_Small_Float_Vector;
      ... which declares a type which is an array with 2 floats in it
      (floats are 4 bytes on AArch64), trying to get GDB to print
      the return value from that function does not work:
          (gdb) fin
          Run till exit from #0  pck.create_small_float_vector () at /[...]/pck.adb:15
          0x000000000000062c in p () at /[...]/p.adb:11
          11         Vector := Create_Small_Float_Vector;
          Value returned is $1 = (4.25, 0.0)
      We expected the value shown to be:
          (gdb) fin
          Run till exit from #0  pck.create_small_float_vector () at /[...]/pck.adb:15
          0x000000000000062c in p () at /[...]/p.adb:11
          11         Vector := Create_Small_Float_Vector;
          Value returned is $1 = (4.25, 4.25)
      Because the return type is an HFA, it is returned via the first two
      SIMD registers. However, what happens is that the current implementation
      fails to realize that this is an HFA, and therefore fetches the return
      value from the wrong location. And the reason why it fails to realize
      this is because it thinks that our array has 8 elements (HFAs have
      a maximum of 4). Looking at aapcs_is_vfp_call_or_return_candidate_1,
      where this is determined, we can easily see why (looks like a thinko):
              | case TYPE_CODE_ARRAY:
              | [...]
              |         struct type *target_type = TYPE_TARGET_TYPE (type);
              |         int count = aapcs_is_vfp_call_or_return_candidate_1
              |                       (target_type, fundamental_type);
              |         if (count == -1)
              |           return count;
        !! -> |         count *= TYPE_LENGTH (type);
              |           return count;
      Here, we first determine the count for one element of our array,
      and so we should then be multiplying that count by the number
      of elements in our array (2 in our case). But instead, we multiply it
      by the total size (8). As a result, we do not classify the return
      type as an HFA, and thus pick the wrong location for fetching
      the return value.
              * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
              return the correct count for potential HFAs.
      Tested on aarch64-linux, fixes:
          array_return.exp: value printed by finish of Create_Small_Float_Vector
  5. 02 Nov, 2018 1 commit
    • Joel Brobecker's avatar
      (Ada) Add ravenscar tasking support on AArch64 · e8bf1ce4
      Joel Brobecker authored
      This patch adds support for debugging Ravenscar tasks, similar to what
      is done for ppc and sparc.
              * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c:
              New files.
              * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
              (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
              * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
              (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
              (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
              * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
              and aarch64-ravenscar-thread.o.
              * NEWS: Add entry documenting Ravenscar tasking support
              on AArch64 ELF.
  6. 01 Oct, 2018 1 commit
    • Alan Hayward's avatar
      Aarch64: Move pseudo defines to header · c74e7cb9
      Alan Hayward authored
      	* aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
      	(AARCH64_D0_REGNUM): Likewise.
      	(AARCH64_S0_REGNUM): Likewise.
      	(AARCH64_H0_REGNUM): Likewise.
      	(AARCH64_B0_REGNUM): Likewise.
      	(AARCH64_SVE_V0_REGNUM): Likewise.
      	* arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
      	(AARCH64_D0_REGNUM): Likewise.
      	(AARCH64_S0_REGNUM): Likewise.
      	(AARCH64_H0_REGNUM): Likewise.
      	(AARCH64_B0_REGNUM): Likewise.
      	(AARCH64_SVE_V0_REGNUM): Likewise.
  7. 18 Sep, 2018 1 commit
    • Alan Hayward's avatar
      Aarch64 SVE: Fix stack smashing when calling functions · 3ff2c72e
      Alan Hayward authored
      Using "call" on a function that passes arguments via float registers can cause
      gdb to overflow buffers.
      Ensure enough memory is reserved to hold a full FP register.
      This fixes gdb.base/callfuncs.exp for Aarch64 SVE.
      2018-09-18  Alan Hayward  <alan.hayward@arm.com>
      	* aarch64-tdep.c (pass_in_v): Use register size.
      	(aarch64_extract_return_value): Likewise.
      	(aarch64_store_return_value): Likewise.
  8. 29 Aug, 2018 3 commits
    • Alan Hayward's avatar
      Aarch64: Float register detection for return values · 4f4aedeb
      Alan Hayward authored
      Use aapcs_is_vfp_call_or_return_candidate to detect float register
      	PR gdb/22943:
      	* aarch64-tdep.c (is_hfa_or_hva): Remove function.
      	(aarch64_extract_return_value): Use
      	(aarch64_return_in_memory): Likewise.
      	(aarch64_store_return_value): Likewise.
    • Alan Hayward's avatar
      Aarch64: Float register detection for _push_dummy_call · 0e745c60
      Alan Hayward authored
      Use aapcs_is_vfp_call_or_return_candidate to detect float register
      args, then pass in registers if there is room.
      	* aarch64-tdep.c
      	(aapcs_is_vfp_call_or_return_candidate): Make static
      	(pass_in_v_or_stack): Remove function.
      	(pass_in_v_vfp_candidate): New function.
      	(aarch64_push_dummy_call): Check for float register candidates.
    • Alan Hayward's avatar
      Aarch64: Func to detect args passed in float regs · ea92689a
      Alan Hayward authored
      aapcs_is_vfp_call_or_return_candidate is as an eventual replacement
      for is_hfa_or_hva.
      This function is based on the GCC code
      gcc/config/aarch64/aarch64.c:aarch64_vfp_is_call_or_return_candidate ()
      	* aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
      	(aapcs_is_vfp_call_or_return_candidate_1): New function.
      	(aapcs_is_vfp_call_or_return_candidate): Likewise.
  9. 27 Aug, 2018 1 commit
    • Tom Tromey's avatar
      Use CORE_ADDR_MAX in various "breaks" arrays · 70ab8ccd
      Tom Tromey authored
      Code like this:
        CORE_ADDR breaks[2] = {-1, -1};
      ... gives a warning with -Wnarrowing.  This patch changes all
      instances of this to use CORE_ADDR_MAX instead.
      2018-08-27  Tom Tromey  <tom@tromey.com>
      	* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
      	* mips-tdep.c (mips_deal_with_atomic_sequence)
      	(micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
      	* arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
      	(arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
      	* alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
      	* aarch64-tdep.c (aarch64_software_single_step): Use
  10. 11 Jul, 2018 1 commit
    • Alan Hayward's avatar
      Rename tdesc_register_size to tdesc_register_bitsize · 12863263
      Alan Hayward authored
      tdesc_register_size returns number of bits, not bytes.
      Rename to make it clearer.
      Also, fixed bug in aarch64_get_tdesc_vq which assumed bytes.
      	* target-descriptions.c (tdesc_register_bitsize): Rename.
      	* target-descriptions.h (tdesc_register_bitsize): Likewise.
      	* rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
      	* aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
  11. 11 Jun, 2018 1 commit
  12. 07 Jun, 2018 1 commit
    • Alan Hayward's avatar
      Aarch64 SVE pseudo register support · 63bad7b6
      Alan Hayward authored
      Add the functionality for reading/writing pseudo registers.
      On SVE the V registers are pseudo registers. This is supported
      by adding AARCH64_SVE_V0_REGNUM.
      	* aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
      	(aarch64_vnv_type): Add function.
      	(aarch64_pseudo_register_name): Add V regs for SVE.
      	(aarch64_pseudo_register_type): Likewise.
      	(aarch64_pseudo_register_reggroup_p): Likewise.
      	(aarch64_pseudo_read_value_2): Use V0 offset for SVE
      	(aarch64_pseudo_read_value): Add V regs for SVE.
      	(aarch64_pseudo_write_2): Use V0 offset for SVE
      	(aarch64_pseudo_write): Add V regs for SVE.
      	* aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
  13. 04 Jun, 2018 4 commits
    • Alan Hayward's avatar
      Add aarch64 pseudo help functions · 3c5cd5c3
      Alan Hayward authored
      Reduce code copy/paste by adding two helper functions for
      aarch64_pseudo_read_value and aarch64_pseudo_write
      Does not change any functionality.
      	* aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
      	(aarch64_pseudo_write_1): Likewise.
      	(aarch64_pseudo_read_value): Use helper.
      	(aarch64_pseudo_write): Likewise.
    • Alan Hayward's avatar
      Use uint64_t for aarch64 tdep VQ · 1332a140
      Alan Hayward authored
    • Alan Hayward's avatar
      Enable SVE for GDB · ba2d2bb2
      Alan Hayward authored
      Enable SVE support for GDB by reading the VQ when creating a
      target description.
      Also ensurse that SVE is taken into account when creating
      the tdep structure, and store the current VQ value directly in tdep.
      	* aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
      	* aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
      	(aarch64_gdbarch_init): Check for SVE.
      	* aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
    • Alan Hayward's avatar
      Use uint64_t for SVE VQ · 39bfb937
      Alan Hayward authored
      Previously VQ was of type long. Using uint64_t ensures it always matches the
      same type as the VG register.
      Note that in the Linux kernel, VQ is 16bits. We cast it up to 64bits
      immediately after reading to ensure we always use the same type throughout
      the code.
      	* aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
      	* aarch64-tdep.h (aarch64_read_description): Likewise.
      	* arch/aarch64.c (aarch64_create_target_description): Likewise.
      	* arch/aarch64.h (aarch64_create_target_description): Likewise.
      	* features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
      	* nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
      	* nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
  14. 01 Jun, 2018 1 commit
    • Alan Hayward's avatar
      Add SVE register defines · 739e8682
      Alan Hayward authored
      In order to prevent gaps in the register numbering, the Z registers
      reuse the V register numbers (which become pseudos on SVE).
      2018-06-01  Alan Hayward  <alan.hayward@arm.com>
      	* aarch64-tdep.c (aarch64_sve_register_names): New const
      	* arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
      	(AARCH64_SVE_Z_REGS_NUM): New define.
      	(AARCH64_SVE_P_REGS_NUM): Likewise.
      	(AARCH64_SVE_NUM_REGS): Likewise.
  15. 31 May, 2018 1 commit
    • Alan Hayward's avatar
      Add Aarch64 SVE target description · 95228a0d
      Alan Hayward authored
      No code uses the new descriptions yet.
      	* aarch64-linux-nat.c (aarch64_linux_read_description):
      	Add parmeter zero.
      	* aarch64-linux-tdep.c (aarch64_linux_core_read_description):
      	* aarch64-tdep.c (tdesc_aarch64_list): Add.
      	(aarch64_read_description): Use VQ to index tdesc_aarch64_list.
      	(aarch64_gdbarch_init): Add parmeter zero.
      	* aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
      	* arch/aarch64.c (aarch64_create_target_description): Check VQ.
      	* arch/aarch64.h (aarch64_create_target_description): Add VQ.
      	* doc/gdb.texinfo: Describe SVE feature
      	* features/aarch64-sve.c: New file.
      	* linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
      	null VQ.
  16. 30 May, 2018 3 commits
    • Simon Marchi's avatar
      Remove regcache_cooked_write · b66f5587
      Simon Marchi authored
      Remove regcache_cooked_write, update callers to use
      	* regcache.h (regcache_cooked_write): Remove, update callers to
      	use regcache::cooked_write.
      	* regcache.c (regcache_cooked_write): Remove.
    • Simon Marchi's avatar
      Remove regcache_cooked_read · dca08e1f
      Simon Marchi authored
      Remove regcache_cooked_read, update callers to use
      readable_regcache::cooked_read instead.
      	* regcache.h (regcache_cooked_read): Remove, update callers to
      	use readable_regcache::cooked_read instead.
      	* regcache.c (regcache_cooked_read): Remove.
    • Simon Marchi's avatar
      Remove regcache_raw_write · 10eaee5f
      Simon Marchi authored
      Remove regcache_raw_write, update all callers to use regcache::raw_write
      	* regcache.h (regcache_raw_write): Remove, update callers to use
      	regcache::raw_write instead.
      	* regcache.c (regcache_raw_write): Remove.
  17. 15 May, 2018 1 commit
    • Tamar Christina's avatar
      Modify AArch64 Assembly and disassembly functions to be able to fail and report why. · 561a72d4
      Tamar Christina authored
      This patch if the first patch in a series to add the ability to add constraints
      to system registers that an instruction must adhere to in order for the register
      to be usable with that instruction.
      These constraints can also be used to disambiguate between registers with the
      same encoding during disassembly.
      This patch adds a new flags entry in the sysreg structures and ensures it is
      filled in and read out during assembly/disassembly. It also adds the ability for
      the assemble and disassemble functions to be able to gracefully fail and re-use
      the existing error reporting infrastructure.
      The return type of these functions are changed to a boolean to denote success or
      failure and the error structure is passed around to them. This requires
      aarch64-gen changes so a lot of the changes here are just mechanical.
      	PR binutils/21446
      	* config/tc-aarch64.c (parse_sys_reg): Return register flags.
      	(parse_operands): Fill in register flags.
      	PR binutils/21446
      	* aarch64-tdep.c (aarch64_analyze_prologue,
      	aarch64_software_single_step, aarch64_displaced_step_copy_insn):
      	Indicate not interested in errors.
      	PR binutils/21446
      	* opcode/aarch64.h (aarch64_opnd_info): Change sysreg to struct.
      	(aarch64_decode_insn): Accept error struct.
      	PR binutils/21446
      	* aarch64-asm.h (aarch64_insert_operand, aarch64_##x): Return boolean
      	and take error struct.
      	* aarch64-asm.c (aarch64_ext_regno, aarch64_ins_reglane,
      	aarch64_ins_reglist, aarch64_ins_ldst_reglist,
      	aarch64_ins_ldst_reglist_r, aarch64_ins_ldst_elemlist,
      	aarch64_ins_advsimd_imm_shift, aarch64_ins_imm, aarch64_ins_imm_half,
      	aarch64_ins_advsimd_imm_modified, aarch64_ins_fpimm,
      	aarch64_ins_imm_rotate1, aarch64_ins_imm_rotate2, aarch64_ins_fbits,
      	aarch64_ins_aimm, aarch64_ins_limm_1, aarch64_ins_limm,
      	aarch64_ins_inv_limm, aarch64_ins_ft, aarch64_ins_addr_simple,
      	aarch64_ins_addr_regoff, aarch64_ins_addr_offset, aarch64_ins_addr_simm,
      	aarch64_ins_addr_simm10, aarch64_ins_addr_uimm12,
      	aarch64_ins_simd_addr_post, aarch64_ins_cond, aarch64_ins_sysreg,
      	aarch64_ins_pstatefield, aarch64_ins_sysins_op, aarch64_ins_barrier,
      	aarch64_ins_prfop, aarch64_ins_hint, aarch64_ins_reg_extended,
      	aarch64_ins_reg_shifted, aarch64_ins_sve_addr_ri_s4xvl,
      	aarch64_ins_sve_addr_ri_s6xvl, aarch64_ins_sve_addr_ri_s9xvl,
      	aarch64_ins_sve_addr_ri_s4, aarch64_ins_sve_addr_ri_u6,
      	aarch64_ins_sve_addr_rr_lsl, aarch64_ins_sve_addr_rz_xtw,
      	aarch64_ins_sve_addr_zi_u5, aarch64_ext_sve_addr_zz,
      	aarch64_ins_sve_addr_zz_lsl, aarch64_ins_sve_addr_zz_sxtw,
      	aarch64_ins_sve_addr_zz_uxtw, aarch64_ins_sve_aimm,
      	aarch64_ins_sve_asimm, aarch64_ins_sve_index, aarch64_ins_sve_limm_mov,
      	aarch64_ins_sve_quad_index, aarch64_ins_sve_reglist,
      	aarch64_ins_sve_scale, aarch64_ins_sve_shlimm, aarch64_ins_sve_shrimm,
      	aarch64_ins_sve_float_half_one, aarch64_ins_sve_float_half_two,
      	aarch64_ins_sve_float_zero_one, aarch64_opcode_encode): Likewise.
      	* aarch64-dis.h (aarch64_extract_operand, aarch64_##x): Likewise.
      	* aarch64-dis.c (aarch64_ext_regno, aarch64_ext_reglane,
      	aarch64_ext_reglist, aarch64_ext_ldst_reglist,
      	aarch64_ext_ldst_reglist_r, aarch64_ext_ldst_elemlist,
      	aarch64_ext_advsimd_imm_shift, aarch64_ext_imm, aarch64_ext_imm_half,
      	aarch64_ext_advsimd_imm_modified, aarch64_ext_fpimm,
      	aarch64_ext_imm_rotate1, aarch64_ext_imm_rotate2, aarch64_ext_fbits,
      	aarch64_ext_aimm, aarch64_ext_limm_1, aarch64_ext_limm, decode_limm,
      	aarch64_ext_inv_limm, aarch64_ext_ft, aarch64_ext_addr_simple,
      	aarch64_ext_addr_regoff, aarch64_ext_addr_offset, aarch64_ext_addr_simm,
      	aarch64_ext_addr_simm10, aarch64_ext_addr_uimm12,
      	aarch64_ext_simd_addr_post, aarch64_ext_cond, aarch64_ext_sysreg,
      	aarch64_ext_pstatefield, aarch64_ext_sysins_op, aarch64_ext_barrier,
      	aarch64_ext_prfop, aarch64_ext_hint, aarch64_ext_reg_extended,
      	aarch64_ext_reg_shifted, aarch64_ext_sve_addr_ri_s4xvl,
      	aarch64_ext_sve_addr_ri_s6xvl, aarch64_ext_sve_addr_ri_s9xvl,
      	aarch64_ext_sve_addr_ri_s4, aarch64_ext_sve_addr_ri_u6,
      	aarch64_ext_sve_addr_rr_lsl, aarch64_ext_sve_addr_rz_xtw,
      	aarch64_ext_sve_addr_zi_u5, aarch64_ext_sve_addr_zz,
      	aarch64_ext_sve_addr_zz_lsl, aarch64_ext_sve_addr_zz_sxtw,
      	aarch64_ext_sve_addr_zz_uxtw, aarch64_ext_sve_aimm,
      	aarch64_ext_sve_asimm, aarch64_ext_sve_index, aarch64_ext_sve_limm_mov,
      	aarch64_ext_sve_quad_index, aarch64_ext_sve_reglist,
      	aarch64_ext_sve_scale, aarch64_ext_sve_shlimm, aarch64_ext_sve_shrimm,
      	aarch64_ext_sve_float_half_one, aarch64_ext_sve_float_half_two,
      	aarch64_ext_sve_float_zero_one, aarch64_opcode_decode): Likewise.
      	(determine_disassembling_preference, aarch64_decode_insn,
      	print_insn_aarch64_word, print_insn_data): Take errors struct.
      	(print_insn_aarch64): Use errors.
      	* aarch64-asm-2.c: Regenerate.
      	* aarch64-dis-2.c: Regenerate.
      	* aarch64-gen.c (print_operand_inserter): Use errors and change type to
      	boolean in aarch64_insert_operan.
      	(print_operand_extractor): Likewise.
      	* aarch64-opc.c (aarch64_print_operand): Use sysreg struct.
  18. 10 May, 2018 1 commit
    • Omair Javaid's avatar
      Fix tagged pointer support · 8727de56
      Omair Javaid authored
      This patch fixes tagged pointer support for AArch64 GDB. Linux kernel
      debugging failure was reported after tagged pointer support was committed.
      After a discussion around best path forward to manage tagged pointers
      on GDB side we are going to disable tagged pointers support for
      aarch64-none-elf-gdb because for non-linux applications we cant be
      sure if tagged pointers will be used by MMU or not.
      Also for aarch64-linux-gdb we are going to sign extend user-space
      address after clearing tag bits. This will help debug both kernel
      and user-space addresses based on information from linux kernel
      documentation given below:
      According to AArch64 memory map:
      "User addresses have bits 63:48 set to 0 while the kernel addresses have
      the same bits set to 1."
      According to AArch64 tagged pointers document:
      The kernel configures the translation tables so that translations made
      via TTBR0 (i.e. userspace mappings) have the top byte (bits 63:56) of
      the virtual address ignored by the translation hardware. This frees up
      this byte for application use.
      Running gdb testsuite after applying this patch introduces no regressions
      and tagged pointer test cases still pass.
      2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
      	PR gdb/23127
      	* aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
      	* aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
      	* utils.c (address_significant): Update to sign extend addr.
  19. 27 Apr, 2018 1 commit
    • Tom Tromey's avatar
      Enable -Wsuggest-override · 632e107b
      Tom Tromey authored
      I noticed the existence of -Wsuggest-override and so this patch
      enables it for gdb.  It found a few spots that could use "override".
      Also I went ahead and removed all uses of the "OVERRIDE" macro.
      Using override is beneficial because it makes it harder to change a
      base class and then forget to change a derived class.
      Tested by the buildbot.
      2018-04-27  Tom Tromey  <tom@tromey.com>
      	* configure: Rebuild.
      	* warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
      	* dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
      	(class symbol_needs_eval_context): Likewise.
      	* dwarf2read.c (mock_mapped_index::symbol_name_count)
      	(mock_mapped_index::symbol_name_at): Use "override".  Remove
      	* dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
      	(class dwarf_expr_executor): Use "override", not "OVERRIDE".
      	* aarch64-tdep.c (instruction_reader::read): Use "override".
      	(instruction_reader_test::read): Likewise.
      	* arm-tdep.c (instruction_reader::read): Use "override".
      	(instruction_reader_thumb::read): Likewise.
      2018-04-27  Tom Tromey  <tom@tromey.com>
      	* configure: Rebuild.
  20. 21 Feb, 2018 1 commit
    • Yao Qi's avatar
      class readable_regcache and pass readable_regcache to gdbarch... · 849d0ba8
      Yao Qi authored
      class readable_regcache and pass readable_regcache to gdbarch pseudo_register_read and pseudo_register_read_value
      pseudo registers are either from raw registers or memory, so
      gdbarch methods pseudo_register_read and pseudo_register_read_value
      should have regcache object which only have read methods.  In other
      words, we should disallow writing to regcache in these two gdbarch
      methods.  In order to apply this restriction, this patch adds a new
      class readable_regcache, derived from reg_buffer, and it only has
      raw_read and cooked_read methods.  regcache is derived from
      readable_regcache.  This patch also passes readable_regcache instead of
      regcache to gdbarch methods pseudo_register_read and
      This patch moves raw_read* and cooked_read* methods to readable_regcache,
      which is straightforward.  One thing not straightforward is that I split
      regcache::xfer_part to readable_regcache::read_part and regcache::write_part,
      because readable_regcache can only have methods to read.
      readable_regcache is an abstract base class, and it has a pure virtual
      function raw_update, because I don't want readable_regcache know where
      these raw registers are from.  They can be from either the target
      (readwrite regcache) or the regcache itself (readonly regcache).
      2018-02-21  Yao Qi  <yao.qi@linaro.org>
      	* aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
      	parameter type to 'readable_regcache *'.
      	* amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
      	* arm-tdep.c (arm_neon_quad_read): Likewise.
      	(arm_pseudo_read): Likewise.
      	* avr-tdep.c (avr_pseudo_register_read): Likewise.
      	* bfin-tdep.c (bfin_pseudo_register_read): Likewise.
      	* frv-tdep.c (frv_pseudo_register_read): Likewise.
      	* gdbarch.c: Re-generated.
      	* gdbarch.h: Re-generated.
      	* gdbarch.sh (pseudo_register_read): Change parameter type to
      	'readable_regcache *'.
      	(pseudo_register_read_value): Likewise.
      	* h8300-tdep.c (pseudo_from_raw_register): Likewise.
      	(h8300_pseudo_register_read): Likewise.
      	* hppa-tdep.c (hppa_pseudo_register_read): Likewise.
      	* i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
      	(i386_pseudo_register_read_into_value): Likewise.
      	(i386_pseudo_register_read_value): Likewise.
      	* i386-tdep.h (i386_pseudo_register_read_into_value): Update
      	* ia64-tdep.c (ia64_pseudo_register_read): Likewise.
      	* m32c-tdep.c (m32c_raw_read): Likewise.
      	(m32c_read_flg): Likewise.
      	(m32c_banked_register): Likewise.
      	(m32c_banked_read): Likewise.
      	(m32c_sb_read): Likewise.
      	(m32c_part_read): Likewise.
      	(m32c_cat_read): Likewise.
      	(m32c_r3r2r1r0_read): Likewise.
      	(m32c_pseudo_register_read): Likewise.
      	* m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
      	* mep-tdep.c (mep_pseudo_cr32_read): Likewise.
      	(mep_pseudo_cr64_read): Likewise.
      	(mep_pseudo_register_read): Likewise.
      	* mips-tdep.c (mips_pseudo_register_read): Likewise.
      	* msp430-tdep.c (msp430_pseudo_register_read): Likewise.
      	* nds32-tdep.c (nds32_pseudo_register_read): Likewise.
      	* regcache.c (regcache::raw_read): Move it to readable_regcache.
      	(regcache::cooked_read): Likewise.
      	(regcache::cooked_read_value): Likewise.
      	(regcache::cooked_read): Likewise.
      	* regcache.h (readable_regcache): New class.
      	(regcache): Inherit readable_regcache.  Move some methods to
      	* rl78-tdep.c (rl78_pseudo_register_read): Change
      	parameter type to 'readable_regcache *'.
      	* rs6000-tdep.c (do_regcache_raw_read): Remove.
      	(e500_pseudo_register_read): Change parameter type to
      	'readable_regcache *'.
      	(dfp_pseudo_register_read): Likewise.
      	(vsx_pseudo_register_read): Likewise.
      	(efpr_pseudo_register_read): Likewise.
      	* s390-tdep.c (s390_pseudo_register_read): Likewise.
      	* sh-tdep.c (sh_pseudo_register_read): Likewise.
      	* sh64-tdep.c (pseudo_register_read_portions): Likewise.
      	(sh64_pseudo_register_read): Likewise.
      	* sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
      	* sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
      	* spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
      	(spu_pseudo_register_read): Likewise.
      	* xtensa-tdep.c	(xtensa_register_read_masked): Likewise.
      	(xtensa_pseudo_register_read): Likewise.
  21. 22 Jan, 2018 1 commit
    • Yao Qi's avatar
      Replace regcache_raw_read with regcache->raw_read · 03f50fc8
      Yao Qi authored
      The patch later in this series will move regcache's raw_read and
      cooked_read methods to a new class regcache_read, and regcache is
      dervied from it.  Also pass regcache_read instead of regcache to gdbarch
      methods pseudo_register_read and pseudo_register_read_value.  In order
      to prepare for this change, this patch changes regcache_raw_read to
      regcache->raw_read.  On the other hand, since we are in C++, I prefer
      using class method (regcache->raw_read).
      2018-01-22  Yao Qi  <yao.qi@linaro.org>
      	* aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
      	method raw_read instead of regcache_raw_read.
      	* amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
      	* arm-tdep.c (arm_neon_quad_read): Likewise.
      	* avr-tdep.c (avr_pseudo_register_read): Likewise.
      	* bfin-tdep.c (bfin_pseudo_register_read): Likewise.
      	* frv-tdep.c (frv_pseudo_register_read): Likewise.
      	* h8300-tdep.c (h8300_pseudo_register_read): Likewise.
      	* i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
      	(i386_pseudo_register_read_into_value): Likewise.
      	* mep-tdep.c (mep_pseudo_cr32_read): Likewise.
      	* msp430-tdep.c (msp430_pseudo_register_read): Likewise.
      	* nds32-tdep.c (nds32_pseudo_register_read): Likewise.
      	* rl78-tdep.c (rl78_pseudo_register_read): Likewise.
      	* s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
      	* sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
      	* sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
      	* spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
      	* xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
  22. 02 Jan, 2018 1 commit
  23. 08 Dec, 2017 1 commit
    • Yao Qi's avatar
      Clear non-significant bits of address on memory access · a738ea1d
      Yao Qi authored
      ARMv8 supports tagged address, that is, the top one byte in address
      is ignored.  It is always enabled on aarch64-linux.  See
      The tag in the tagged address is modeled as non-significant bits in
      address, so this patch adds a new gdbarch method significant_addr_bit and
      clear the non-significant bits (the top byte in ARMv8) of the virtual
      address at the point before passing address to target cache layer.  IOW,
      the address used in the target cache layer is already cleared.
      Before this patch,
      (gdb) x/x 0x0000000000411030
      0x411030 <global>:	0x00000000
      (gdb) x/x 0xf000000000411030
      0xf000000000411030:	Cannot access memory at address 0xf000000000411030
      After this patch,
      (gdb) x/x 0x0000000000411030
      0x411030 <global>:	0x00000000
      (gdb) x/x 0xf000000000411030
      0xf000000000411030:	0x00000000
      Note that I used address_significant in paddress, but it causes a
      regression gdb.base/long_long.exp, because gdb clears the non-significant
      bits in address, but test still expects them.
      p/a val.oct^M
      $24 = 0x2ee53977053977^M
      (gdb) FAIL: gdb.base/long_long.exp: p/a val.oct
      so I defer the change there.
      2017-12-08  Yao Qi  <yao.qi@linaro.org>
      	* aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
      	* gdbarch.sh (significant_addr_bit): New.
      	* gdbarch.c, gdbarch.h: Re-generated.
      	* target.c (memory_xfer_partial): Call address_significant.
      	* utils.c (address_significant): New function.
      	* utils.h (address_significant): Declare.
      2017-12-08  Yao Qi  <yao.qi@linaro.org>
      	* gdb.arch/aarch64-tagged-pointer.c: New file.
      	* gdb.arch/aarch64-tagged-pointer.exp: New file.
  24. 24 Nov, 2017 3 commits
    • Alan Hayward's avatar
      Add xml selftests for aarch64 target description. · 6654d750
      Alan Hayward authored
      	* aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
      	* configure.srv: Add linux-aarch64-tdesc-selftest.o.
      	* linux-aarch64-low.c (initialize_low_arch): Call init func.
      	* linux-aarch64-tdesc-selftest.c: New file.
      	* linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
    • Alan Hayward's avatar
      Use flexible target descriptors for aarch64 · 49bdb7ee
      Alan Hayward authored
      	* aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
      	* arch/aarch64.c (aarch64_create_target_description): Create
      	new target description.
      	* features/Makefile: Add new files.
      	* features/aarch64.c: Remove file.
      	* features/aarch64-core.c: New autogenerated file.
      	* features/aarch64-fpu.c: New autogenerated file.
      	* target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
      	* linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
      	* linux-aarch64-low.c (initialize_low_arch): Remove init.
      	* linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
    • Alan Hayward's avatar
      Add aarch64_create_target_description · da434ccb
      Alan Hayward authored
      	* Makefile.in: Add new files.
      	* aarch64-linux-nat.c (aarch64_linux_read_description): Call
      	* aarch64-linux-tdep.c (aarch64_linux_core_read_description):
      	Call aarch64_read_description.
      	* aarch64-tdep.c (aarch64_read_description): New function.
      	(aarch64_gdbarch_init): Call aarch64_read_description.
      	* aarch64-tdep.h (aarch64_read_description): New function.
      	* arch/aarch64.c: New file.
      	* configure.tgt: Add new files.
  25. 25 Oct, 2017 1 commit
    • Yao Qi's avatar
      s/get_regcache_arch (regcache)/regcache->arch ()/g · ac7936df
      Yao Qi authored
      This patches removes get_regcache_arch, and use regache->arch () instead.
      The motivation of this change is that I am going to move some basic stuff
      into a base class of regcache.  I don't need to update "client" code
      regcache->arch ().  On the other hand, this patch shortens the code a
      little bit.
      2017-10-25  Yao Qi  <yao.qi@linaro.org>
      	* aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
      	regcache->arch () instead get_regcache_arch.
      	* aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
      	(aarch64_fbsd_store_inferior_registers): Likewise.
      	* aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
      	(store_gregs_to_thread): Likewise.
      	(fetch_fpregs_from_thread): Likewise.
      	(store_fpregs_to_thread): Likewise.
      	* aarch64-tdep.c (aarch64_extract_return_value): Likewise.
      	(aarch64_store_return_value): Likewise.
      	(aarch64_software_single_step): Likewise.
      	* aix-thread.c (aix_thread_wait): Likewise.
      	(supply_reg32): Likewise.
      	(supply_sprs64): Likewise.
      	(supply_sprs32): Likewise.
      	(fill_gprs64): Likewise.
      	(fill_gprs32): Likewise.
      	(fill_sprs64): Likewise.
      	(fill_sprs32): Likewise.
      	(store_regs_user_thread): Likewise.
      	(store_regs_kernel_thread): Likewise.
      	* alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
      	(alphabsd_store_inferior_registers): Likewise.
      	* alpha-tdep.c (alpha_extract_return_value): Likewise.
      	(alpha_store_return_value): Likewise.
      	(alpha_deal_with_atomic_sequence): Likewise.
      	(alpha_next_pc): Likewise.
      	(alpha_software_single_step): Likewise.
      	* amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
      	(amd64bsd_store_inferior_registers): Likewise.
      	* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
      	(amd64_linux_store_inferior_registers): Likewise.
      	* amd64-nat.c (amd64_supply_native_gregset): Likewise.
      	(amd64_collect_native_gregset): Likewise.
      	* amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
      	(amd64obsd_collect_uthread): Likewise.
      	* amd64-tdep.c (amd64_supply_fpregset): Likewise.
      	(amd64_collect_fpregset): Likewise.
      	(amd64_supply_fxsave): Likewise.
      	(amd64_supply_xsave): Likewise.
      	(amd64_collect_fxsave): Likewise.
      	(amd64_collect_xsave): Likewise.
      	* arc-tdep.c (arc_write_pc): Likewise.
      	* arch-utils.c (default_skip_permanent_breakpoint): Likewise.
      	* arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
      	(arm_fbsd_store_inferior_registers): Likewise.
      	* arm-linux-nat.c (fetch_vfp_regs): Likewise.
      	(store_vfp_regs): Likewise.
      	(arm_linux_fetch_inferior_registers): Likewise.
      	(arm_linux_store_inferior_registers): Likewise.
      	* arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
      	(arm_linux_sigreturn_next_pc): Likewise.
      	(arm_linux_get_next_pcs_syscall_next_pc): Likewise.
      	* arm-nbsd-nat.c (arm_supply_gregset): Likewise.
      	(fetch_register): Likewise.
      	(store_register): Likewise.
      	* arm-tdep.c (arm_is_thumb): Likewise.
      	(displaced_in_arm_mode): Likewise.
      	(bx_write_pc): Likewise.
      	(arm_get_next_pcs_addr_bits_remove): Likewise.
      	(arm_software_single_step): Likewise.
      	(arm_extract_return_value): Likewise.
      	(arm_store_return_value): Likewise.
      	(arm_write_pc): Likewise.
      	* bfin-tdep.c (bfin_extract_return_value): Likewise.
      	* bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
      	(bsd_uthread_store_registers): Likewise.
      	* core-regset.c (fetch_core_registers): Likewise.
      	* corelow.c (get_core_registers): Likewise.
      	* cris-tdep.c (cris_store_return_value): Likewise.
      	(cris_extract_return_value): Likewise.
      	(find_step_target): Likewise.
      	(find_step_target): Likewise.
      	(cris_software_single_step): Likewise.
      	* ctf.c (ctf_fetch_registers): Likewise.
      	* darwin-nat.c (cancel_breakpoint): Likewise.
      	* fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
      	* frv-tdep.c (frv_extract_return_value): Likewise.
      	* ft32-tdep.c (ft32_store_return_value): Likewise.
      	(ft32_extract_return_value): Likewise.
      	* go32-nat.c (fetch_register): Likewise.
      	(go32_fetch_registers): Likewise.
      	(go32_store_registers): Likewise.
      	(store_register): Likewise.
      	* h8300-tdep.c (h8300_extract_return_value): Likewise.
      	(h8300_store_return_value): Likewise.
      	* hppa-linux-nat.c (fetch_register): Likewise.
      	(store_register): Likewise.
      	(hppa_linux_fetch_inferior_registers): Likewise.
      	(hppa_linux_store_inferior_registers): Likewise.
      	* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
      	(i386_darwin_store_inferior_registers): Likewise.
      	* i386-gnu-nat.c (gnu_fetch_registers): Likewise.
      	(gnu_store_registers): Likewise.
      	* i386-linux-nat.c (fetch_register): Likewise.
      	(store_register): Likewise.
      	(supply_gregset): Likewise.
      	(fill_gregset): Likewise.
      	(i386_linux_fetch_inferior_registers): Likewise.
      	(i386_linux_store_inferior_registers): Likewise.
      	(i386_linux_resume): Likewise.
      	* i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
      	* i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
      	* i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
      	* i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
      	(i386obsd_collect_uthread): Likewise.
      	* i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
      	(i386_supply_gregset): Likewise.
      	(i386_collect_gregset): Likewise.
      	(i386_supply_fpregset): Likewise.
      	(i386_collect_fpregset): Likewise.
      	(i386_mpx_bd_base): Likewise.
      	* i386-v4-nat.c	(supply_fpregset): Likewise.
      	(fill_fpregset): Likewise.
      	* i387-tdep.c (i387_supply_fsave): Likewise.
      	(i387_collect_fsave): Likewise.
      	(i387_supply_fxsave): Likewise.
      	(i387_collect_fxsave): Likewise.
      	(i387_supply_xsave): Likewise.
      	(i387_collect_xsave): Likewise.
      	* ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
      	(ia64_linux_store_registers): Likewise.
      	* ia64-tdep.c (ia64_access_rse_reg): Likewise.
      	(ia64_extract_return_value): Likewise.
      	(ia64_store_return_value): Likewise.
      	(find_func_descr): Likewise.
      	* inf-child.c (inf_child_fetch_inferior_registers): Likewise.
      	* inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
      	(inf_ptrace_store_registers): Likewise.
      	* infrun.c (use_displaced_stepping): Likewise.
      	(displaced_step_prepare_throw): Likewise.
      	(resume): Likewise.
      	(proceed): Likewise.
      	(do_target_wait): Likewise.
      	(adjust_pc_after_break): Likewise.
      	(handle_inferior_event_1): Likewise.
      	(handle_signal_stop): Likewise.
      	(save_infcall_suspend_state): Likewise.
      	(restore_infcall_suspend_state): Likewise.
      	* iq2000-tdep.c (iq2000_extract_return_value): Likewise.
      	* jit.c (jit_frame_prev_register): Likewise.
      	* linux-nat.c (save_stop_reason): Likewise.
      	(linux_nat_wait_1): Likewise.
      	(resume_stopped_resumed_lwps): Likewise.
      	* linux-record.c (record_linux_sockaddr): Likewise.
      	(record_linux_msghdr): Likewise.
      	(record_linux_system_call): Likewise.
      	* linux-tdep.c (linux_collect_thread_registers): Likewise.
      	* lm32-tdep.c (lm32_extract_return_value): Likewise.
      	(lm32_store_return_value): Likewise.
      	* m32c-tdep.c (m32c_read_flg): Likewise.
      	(m32c_pseudo_register_read): Likewise.
      	(m32c_pseudo_register_write): Likewise.
      	* m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
      	(m32r_linux_collect_gregset): Likewise.
      	* m32r-tdep.c (m32r_store_return_value): Likewise.
      	(m32r_extract_return_value): Likewise.
      	* m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
      	(m68kbsd_collect_fpregset): Likewise.
      	* m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
      	* m68k-linux-nat.c (fetch_register): Likewise.
      	(old_fetch_inferior_registers): Likewise.
      	(old_store_inferior_registers): Likewise.
      	(store_regs): Likewise.
      	* m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
      	(m68k_svr4_store_return_value): Likewise.
      	* m88k-tdep.c (m88k_store_arguments): Likewise.
      	* mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
      	(mi_cmd_data_write_register_values): Likewise.
      	* mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
      	(mips_fbsd_store_inferior_registers): Likewise.
      	* mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
      	(mips_fbsd_supply_gregs): Likewise.
      	(mips_fbsd_collect_fpregs): Likewise.
      	(mips_fbsd_collect_gregs): Likewise.
      	(mips_fbsd_supply_fpregset): Likewise.
      	(mips_fbsd_collect_fpregset): Likewise.
      	(mips_fbsd_supply_gregset): Likewise.
      	(mips_fbsd_collect_gregset): Likewise.
      	* mips-linux-nat.c (supply_gregset): Likewise.
      	(fill_gregset): Likewise.
      	(supply_fpregset): Likewise.
      	(fill_fpregset): Likewise.
      	* mips-linux-tdep.c (mips_supply_gregset): Likewise.
      	(mips_fill_gregset): Likewise.
      	(mips_supply_fpregset): Likewise.
      	(mips_fill_fpregset): Likewise.
      	(mips64_supply_gregset): Likewise.
      	(micromips_linux_sigframe_validate): Likewise.
      	* mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
      	(mipsnbsd_fetch_inferior_registers): Likewise.
      	(mipsnbsd_store_inferior_registers): Likewise.
      	* mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
      	(mipsnbsd_supply_gregset): Likewise.
      	(mipsnbsd_iterate_over_regset_sections): Likewise.
      	(mipsnbsd_supply_reg): Likewise.
      	(mipsnbsd_supply_fpreg): Likewise.
      	* mips-tdep.c (mips_in_frame_stub): Likewise.
      	(mips_dummy_id): Likewise.
      	(is_octeon_bbit_op): Likewise.
      	(micromips_bc1_pc): Likewise.
      	(extended_mips16_next_pc): Likewise.
      	(mips16_next_pc): Likewise.
      	(deal_with_atomic_sequence): Likewise.
      	* moxie-tdep.c (moxie_process_readu): Likewise.
      	* nios2-tdep.c (nios2_get_next_pc): Likewise.
      	* nto-procfs.c (procfs_store_registers): Likewise.
      	* ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
      	(ppcfbsd_store_inferior_registers): Likewise.
      	* ppc-linux-nat.c (fetch_vsx_register): Likewise.
      	(fetch_altivec_register): Likewise.
      	(get_spe_registers): Likewise.
      	(fetch_spe_register): Likewise.
      	(fetch_altivec_registers): Likewise.
      	(fetch_all_gp_regs): Likewise.
      	(fetch_all_fp_regs): Likewise.
      	(store_vsx_register): Likewise.
      	(store_altivec_register): Likewise.
      	(set_spe_registers): Likewise.
      	(store_spe_register): Likewise.
      	(store_altivec_registers): Likewise.
      	(store_all_gp_regs): Likewise.
      	(store_all_fp_regs): Likewise.
      	* ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
      	(ppc_linux_collect_gregset): Likewise.
      	(ppc_canonicalize_syscall): Likewise.
      	(ppc_linux_record_signal): Likewise.
      	(ppu2spu_prev_register): Likewise.
      	* ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
      	* ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
      	(ppcobsd_store_registers): Likewise.
      	* ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
      	(ppc_ravenscar_generic_store_registers): Likewise.
      	* procfs.c (procfs_fetch_registers): Likewise.
      	(procfs_store_registers): Likewise.
      	* ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
      	(ravenscar_store_registers): Likewise.
      	(ravenscar_prepare_to_store): Likewise.
      	* record-btrace.c (record_btrace_fetch_registers): Likewise.
      	* record-full.c (record_full_wait_1): Likewise.
      	(record_full_registers_change): Likewise.
      	(record_full_store_registers): Likewise.
      	(record_full_core_fetch_registers): Likewise.
      	(record_full_save): Likewise.
      	(record_full_goto_insn): Likewise.
      	* regcache.c (regcache_register_size): Likewise.
      	(get_regcache_arch): Remove.
      	(regcache_read_pc): Likewise.
      	* regcache.h (get_regcache_arch): Remove.
      	* remote-sim.c (gdbsim_fetch_register): Likewise.
      	(gdbsim_store_register): Likewise.
      	* remote.c (fetch_register_using_p): Likewise.
      	(send_g_packet): Likewise.
      	(remote_prepare_to_store): Likewise.
      	(store_registers_using_G): Likewise.
      	* reverse.c (save_bookmark_command): Likewise.
      	(goto_bookmark_command): Likewise.
      	* rs6000-aix-tdep.c (branch_dest): Likewise.
      	* rs6000-nat.c (rs6000_ptrace64): Likewise.
      	(fetch_register): Likewise.
      	* rs6000-tdep.c (ppc_supply_reg): Likewise.
      	(ppc_collect_reg): Likewise.
      	(ppc_collect_gregset): Likewise.
      	(ppc_collect_fpregset): Likewise.
      	(ppc_collect_vsxregset): Likewise.
      	(ppc_collect_vrregset): Likewise.
      	(ppc_displaced_step_hw_singlestep): Likewise.
      	(rs6000_pseudo_register_read): Likewise.
      	(rs6000_pseudo_register_write): Likewise.
      	* s390-linux-nat.c (supply_gregset): Likewise.
      	(fill_gregset): Likewise.
      	(s390_linux_fetch_inferior_registers): Likewise.
      	* s390-linux-tdep.c (s390_write_pc): Likewise.
      	(s390_software_single_step): Likewise.
      	(s390_all_but_pc_registers_record): Likewise.
      	(s390_linux_syscall_record): Likewise.
      	* sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
      	* sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
      	(shnbsd_store_inferior_registers): Likewise.
      	* sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
      	(sh_extract_return_value_fpu): Likewise.
      	(sh_store_return_value_nofpu): Likewise.
      	(sh_corefile_supply_regset): Likewise.
      	(sh_corefile_collect_regset): Likewise.
      	* sh64-tdep.c (sh64_extract_return_value): Likewise.
      	(sh64_store_return_value): Likewise.
      	* sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
      	* sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
      	(sparc_store_inferior_registers): Likewise.
      	* sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
      	(sparc_ravenscar_prepare_to_store): Likewise.
      	* sparc-tdep.c (sparc32_store_arguments): Likewise.
      	(sparc_analyze_control_transfer): Likewise.
      	(sparc_step_trap): Likewise.
      	(sparc_software_single_step): Likewise.
      	(sparc32_gdbarch_init): Likewise.
      	(sparc_supply_rwindow): Likewise.
      	(sparc_collect_rwindow): Likewise.
      	* sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
      	* sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
      	(sparc64nbsd_collect_gregset): Likewise.
      	(sparc64nbsd_supply_fpregset): Likewise.
      	(sparc64nbsd_collect_fpregset): Likewise.
      	* sparc64-tdep.c (sparc64_store_arguments): Likewise.
      	(sparc64_supply_gregset): Likewise.
      	(sparc64_collect_gregset): Likewise.
      	(sparc64_supply_fpregset): Likewise.
      	(sparc64_collect_fpregset): Likewise.
      	* spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
      	* spu-tdep.c (spu_unwind_sp): Likewise.
      	(spu2ppu_prev_register): Likewise.
      	(spu_memory_remove_breakpoint): Likewise.
      	* stack.c (return_command): Likewise.
      	* tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
      	* tracefile-tfile.c (tfile_fetch_registers): Likewise.
      	* tracefile.c (trace_save_ctf): Likewise.
      	* windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
      	(do_windows_store_inferior_registers): Likewise.
      	(windows_resume): Likewise.
      	* xtensa-linux-nat.c (fill_gregset): Likewise.
      	(supply_gregset_reg): Likewise.
      	* xtensa-tdep.c (xtensa_register_write_masked): Likewise.
      	(xtensa_register_read_masked): Likewise.
      	(xtensa_supply_gregset): Likewise.
      	(xtensa_extract_return_value): Likewise.
      	(xtensa_store_return_value): Likewise.
  26. 21 Oct, 2017 1 commit
    • Simon Marchi's avatar
      Create a displaced_step_closure class hierarchy · cfba9872
      Simon Marchi authored
      displaced_step_closure is a type defined in multiple -tdep.c files.
      Trying to xfree it from the common code (infrun.c) is a problem when we
      try to poison xfree for non-POD types.  Because there can be multiple of
      these types in the same build, this patch makes a hierarchy of classes
      with a virtual destructor.  When the common code deletes the object
      through a displaced_step_closure pointer, it will invoke the right
      The amd64 used a last-member array with a variable size.  That doesn't
      work with new, so I changed it for an std::vector.  Other architectures
      which used a simple byte buffer as a closure now use a shared
      buf_displaced_step_closure, a closure type that only contains a
      Reg-tested on the buildbot.
      	* infrun.h: Include common/byte-vector.h.
      	(struct displaced_step_closure): New struct.
      	(struct buf_displaced_step_closure): New struct.
      	* infrun.c (displaced_step_closure::~displaced_step_closure):
      	Provide default implementation.
      	(displaced_step_clear): Deallocate step closure with delete.
      	* aarch64-tdep.c (displaced_step_closure): Rename to ...
      	(aarch64_displaced_step_closure): ... this, extend
      	(aarch64_displaced_step_data) <dsc>: Change type to
      	(aarch64_displaced_step_copy_insn): Adjust to type change, use
      	(aarch64_displaced_step_fixup): Add cast for displaced step
      	* amd64-tdep.c (displaced_step_closure): Rename to ...
      	(amd64_displaced_step_closure): ... this, extend
      	<insn_buf>: Change type to std::vector<gdb_byte>.
      	<max_len>: Remove.
      	(fixup_riprel): Change type of DSC parameter, adjust to type
      	change of insn_buf.
      	(fixup_displaced_copy): Change type of DSC parameter.
      	(amd64_displaced_step_copy_insn): Instantiate
      	(amd64_displaced_step_fixup): Add cast for closure type, adjust
      	to type change of insn_buf.
      	* arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
      	parameter DSC.
      	(arm_linux_copy_svc): Likewise.
      	(cleanup_kernel_helper_return): Likewise.
      	(arm_catch_kernel_helper_return): Likewise.
      	(arm_linux_displaced_step_copy_insn): Instantiate
      	* arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
      	(displaced_read_reg): Change type of parameter DSC.
      	(branch_write_pc): Likewise.
      	(load_write_pc): Likewise.
      	(alu_write_pc): Likewise.
      	(displaced_write_reg): Likewise.
      	(arm_copy_unmodified): Likewise.
      	(thumb_copy_unmodified_32bit): Likewise.
      	(thumb_copy_unmodified_16bit): Likewise.
      	(cleanup_preload): Likewise.
      	(install_preload): Likewise.
      	(arm_copy_preload): Likewise.
      	(thumb2_copy_preload): Likewise.
      	(install_preload_reg): Likewise.
      	(arm_copy_preload_reg): Likewise.
      	(cleanup_copro_load_store): Likewise.
      	(install_copro_load_store): Likewise.
      	(arm_copy_copro_load_store) Likewise.
      	(thumb2_copy_copro_load_store): Likewise.
      	(cleanup_branch): Likewise.
      	(install_b_bl_blx): Likewise.
      	(arm_copy_b_bl_blx): Likewise.
      	(thumb2_copy_b_bl_blx): Likewise.
      	(thumb_copy_b): Likewise.
      	(install_bx_blx_reg): Likewise.
      	(arm_copy_bx_blx_reg): Likewise.
      	(thumb_copy_bx_blx_reg): Likewise.
      	(cleanup_alu_imm): Likewise.
      	(arm_copy_alu_imm): Likewise.
      	(thumb2_copy_alu_imm): Likewise.
      	(cleanup_alu_reg): Likewise.
      	(install_alu_reg): Likewise.
      	(arm_copy_alu_reg): Likewise.
      	(thumb_copy_alu_reg): Likewise.
      	(cleanup_alu_shifted_reg): Likewise.
      	(install_alu_shifted_reg): Likewise.
      	(arm_copy_alu_shifted_reg): Likewise.
      	(cleanup_load): Likewise.
      	(cleanup_store): Likewise.
      	(arm_copy_extra_ld_st): Likewise.
      	(install_load_store): Likewise.
      	(thumb2_copy_load_literal): Likewise.
      	(thumb2_copy_load_reg_imm): Likewise.
      	(arm_copy_ldr_str_ldrb_strb): Likewise.
      	(cleanup_block_load_all): Likewise.
      	(cleanup_block_store_pc): Likewise.
      	(cleanup_block_load_pc): Likewise.
      	(arm_copy_block_xfer): Likewise.
      	(thumb2_copy_block_xfer): Likewise.
      	(cleanup_svc): Likewise.
      	(install_svc): Likewise.
      	(arm_copy_svc): Likewise.
      	(thumb_copy_svc): Likewise.
      	(arm_copy_undef): Likewise.
      	(thumb_32bit_copy_undef): Likewise.
      	(arm_copy_unpred): Likewise.
      	(arm_decode_misc_memhint_neon): Likewise.
      	(arm_decode_unconditional): Likewise.
      	(arm_decode_miscellaneous): Likewise.
      	(arm_decode_dp_misc): Likewise.
      	(arm_decode_ld_st_word_ubyte): Likewise.
      	(arm_decode_media): Likewise.
      	(arm_decode_b_bl_ldmstm): Likewise.
      	(arm_decode_ext_reg_ld_st): Likewise.
      	(thumb2_decode_dp_shift_reg): Likewise.
      	(thumb2_decode_ext_reg_ld_st): Likewise.
      	(arm_decode_svc_copro): Likewise.
      	(thumb2_decode_svc_copro): Likewise.
      	(install_pc_relative): Likewise.
      	(thumb_copy_pc_relative_16bit): Likewise.
      	(thumb_decode_pc_relative_16bit): Likewise.
      	(thumb_copy_pc_relative_32bit): Likewise.
      	(thumb_copy_16bit_ldr_literal): Likewise.
      	(thumb_copy_cbnz_cbz): Likewise.
      	(thumb2_copy_table_branch): Likewise.
      	(cleanup_pop_pc_16bit_all): Likewise.
      	(thumb_copy_pop_pc_16bit): Likewise.
      	(thumb_process_displaced_16bit_insn): Likewise.
      	(decode_thumb_32bit_ld_mem_hints): Likewise.
      	(thumb_process_displaced_32bit_insn): Likewise.
      	(thumb_process_displaced_insn): Likewise.
      	(arm_process_displaced_insn): Likewise.
      	(arm_displaced_init_closure): Likewise.
      	(arm_displaced_step_fixup): Add cast for closure.
      	* arm-tdep.h: Include infrun.h.
      	(displaced_step_closure): Rename to ...
      	(arm_displaced_step_closure): ... this, extend
      	<u::svc::copy_svc_os>: Change type of parameter DSC.
      	<cleanup>: Likewise.
      	(arm_process_displaced_insn): Likewise.
      	(arm_displaced_init_closure): Likewise.
      	(displaced_read_reg): Likewise.
      	(displaced_write_reg): Likewise.
      	* i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
      	* i386-tdep.h: Include infrun.h.
      	(i386_displaced_step_closure): New typedef.
      	* i386-tdep.c (i386_displaced_step_copy_insn): Use
      	(i386_displaced_step_fixup): Adjust.
      	* rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
      	(ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
      	and unique_ptr.
      	(ppc_displaced_step_fixup): Adjust.
      	* s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
      	(s390_displaced_step_copy_insn): Use s390_displaced_step_closure
      	and unique_ptr.
      	(s390_displaced_step_fixup): Adjust.
  27. 12 Oct, 2017 1 commit
    • Tom Tromey's avatar
      C++-ify prologue-value's pv_area · f7b7ed97
      Tom Tromey authored
      This patch is an initial C++-ification of pv_area, from
      prologue-value.  It turns pv_area into a class with a constructor and
      destructor; renames the data members; and changes various functions to
      be member functions.  This allows the removal of
      2017-10-12  Tom Tromey  <tom@tromey.com>
      	* s390-linux-tdep.c (s390_store, s390_load)
      	(s390_check_for_saved, s390_analyze_prologue): Update.
      	* rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
      	* rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
      	* prologue-value.h (class pv_area): Move from prologue-value.c.
      	Change names of members.  Add constructor, destructor, member
      	(make_pv_area, free_pv_area, make_cleanup_free_pv_area)
      	(pv_area_store, pv_area_fetch, pv_area_store_would_trash)
      	(pv_area_fetch, pv_area_scan): Don't declare.
      	* prologue-value.c (struct pv_area::area_entry): Now member of
      	(struct pv_area): Move to prologue-value.h.
      	(pv_area::pv_area): Rename from make_pv_area.
      	(pv_area::~pv_area): Rename from free_pv_area.
      	(do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
      	(clear_entries, find_entry, overlaps, store_would_trash, store)
      	(fetch, find_reg, scan): Now member of pv_area.
      	Remove "area" argument.  Update.
      	* msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
      	* mn10300-tdep.c (push_reg, check_for_saved)
      	(mn10300_analyze_prologue): Update.
      	* mep-tdep.c (is_arg_spill, check_for_saved)
      	(mep_analyze_prologue): Update.
      	* m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
      	(m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
      	(m32c_is_struct_return, m32c_analyze_prologue): Update.
      	* arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
      	* arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
      	* aarch64-tdep.c (aarch64_analyze_prologue): Update.
  28. 05 Oct, 2017 1 commit
    • Ulrich Weigand's avatar
      Clean up includes of doublest.h and floatformat.h · 1841ee5d
      Ulrich Weigand authored
      As a first small step to getting rid of doublest.h, this patch removes the
      include of "floatformat.h" in "doublest.h".  This is actually not needed
      for the file itself.  A few source files now need to include "floatformat.h"
      directly, since they got it indirectly via "doublest.h" and still need it.
      In reviewing which files need it, I found a number of files that include
      "floatformat.h" directly without actually needing it at all.  Similarly,
      a number of files include "doublest.h" without needing it.  I've also
      removed those unnecessary include statements.
      2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
      	* doublest.h: Do not include "floatformat.h".  Remove stale comments.
      	* gdbtypes.c: Include "floatformat.h".
      	* value.c: Likewise.
      	* m68k-tdep.c: Likewise.
      	* findvar.c: Do not include "floatformat.h".
      	* amd64-darwin-tdep.c: Likewise.
      	* arm-linux-tdep.c: Likewise.
      	* i386-darwin-tdep.c: Likewise.
      	* i387-tdep.c: Likewise.
      	* m68k-linux-tdep.c: Likewise.
      	* mep-tdep.c: Likewise.
      	* mips-tdep.c: Likewise.
      	* nios2-tdep.c: Likewise.
      	* s390-linux-tdep.c: Likewise.
      	* sparc-obsd-tdep.c: Likewise.
      	* sparc-tdep.c: Likewise.
      	* sparc64-tdep.c: Likewise.
      	* spu-tdep.c: Likewise.
      	* tic6x-tdep.c: Likewise.
      	* tilegx-tdep.c: Likewise.
      	* vax-tdep.c: Likewise.
      	* xstormy16-tdep.c: Likewise.
      	* xtensa-tdep.c: Likewise.
      	* top.c: Do not include "doublest.h".
      	* aarch64-tdep.c: Likewise.
      	* alpha-tdep.c: Likewise.
      	* arm-linux-tdep.c: Likewise.
      	* m68k-linux-tdep.c: Likewise.
      	* tilegx-tdep.c: Likewise.
      	* xstormy16-tdep.c: Likewise.
  29. 16 Sep, 2017 1 commit
    • Simon Marchi's avatar
      Add selftests run filtering · 1526853e
      Simon Marchi authored
      With the growing number of selftests, I think it would be useful to be
      able to run only a subset of the tests.  This patch associates a name to
      each registered selftest.  It then allows doing something like:
        (gdb) maintenance selftest aarch64
        Running self-tests.
        Running selftest aarch64-analyze-prologue.
        Running selftest aarch64-process-record.
        Ran 2 unit tests, 0 failed
      or with gdbserver:
        ./gdbserver --selftest=aarch64
      In both cases, only the tests that contain "aarch64" in their name are
      ran.  To help validate that the tests you want to run were actually ran,
      it also prints a message with the test name before running each test.
      Right now, all the arch-dependent tests are registered as a single test
      of the selftests.  To be able to filter those too, I made them
      "first-class citizen" selftests.  The selftest type is an interface,
      with different implementations for "simple selftests" and "arch
      selftests".  The run_tests function simply iterates on that an invokes
      operator() on each test.
      I changed the tests data structure from a vector to a map, because
        - it allows iterating in a stable (alphabetical) order
        - it allows to easily verify if a test with a given name has been
          registered, to avoid duplicates
      There's also a new command "maintenance info selftests" that lists the
      registered selftests.
      	* common/selftest.h (selftest): New struct/interface.
      	(register_test): Add name parameter, add new overload.
      	(run_tests): Add filter parameter.
      	(for_each_selftest_ftype): New typedef.
      	(for_each_selftest): New declaration.
      	* common/selftest.c (tests): Change type to
      	map<string, unique_ptr<selftest>>.
      	(simple_selftest): New struct.
      	(register_test): New function.
      	(register_test): Add name parameter and use it.
      	(run_tests): Add filter parameter and use it.  Add prints.
      	Adjust to vector -> map change.
      	* aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
      	registering selftests.
      	* arm-tdep.c (_initialize_arm_tdep): Likewise.
      	* disasm-selftests.c (_initialize_disasm_selftests): Likewise.
      	* dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
      	* dwarf2loc.c (_initialize_dwarf2loc): Likewise.
      	* findvar.c (_initialize_findvar): Likewise.
      	* gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
      	* maint.c (maintenance_selftest): Update call to run_tests.
      	(maintenance_info_selftests): New function.
      	(_initialize_maint_cmds): Register "maintenance info selftests"
      	command.  Update "maintenance selftest" doc.
      	* regcache.c (_initialize_regcache): Add names when registering
      	* rust-exp.y (_initialize_rust_exp): Likewise.
      	* selftest-arch.c (gdbarch_selftest): New struct.
      	(gdbarch_tests): Remove.
      	(register_test_foreach_arch): Add name parameter.  Call
      	(tests_with_arch): Remove, move most content to
      	(_initialize_selftests_foreach_arch): Remove.
      	* selftest-arch.h (register_test_foreach_arch): Add name
      	(run_tests_with_arch): New declaration.
      	* utils-selftests.c (_initialize_utils_selftests): Add names
      	when registering selftests.
      	* utils.c (_initialize_utils): Likewise.
      	* unittests/array-view-selftests.c
      	(_initialize_array_view_selftests): Likewise.
      	* unittests/environ-selftests.c (_initialize_environ_selftests):
      	* unittests/function-view-selftests.c
      	(_initialize_function_view_selftests): Likewise.
      	* unittests/offset-type-selftests.c
      	(_initialize_offset_type_selftests): Likewise.
      	* unittests/optional-selftests.c
      	(_initialize_optional_selftests): Likewise.
      	* unittests/scoped_restore-selftests.c
      	(_initialize_scoped_restore_selftests): Likewise.
      	* NEWS: Document "maintenance selftest" and "maint info
      	* server.c (captured_main): Accept argument for --selftest.
      	Update run_tests call.
      	* linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
      	when registering selftests.
      	* gdb.texinfo (Maintenance Commands): Document filter parameter
      	of "maint selftest".  Document "maint info selftests" command.
  30. 09 Sep, 2017 1 commit
    • John Baldwin's avatar
      Remove unnecessary function prototypes. · 481695ed
      John Baldwin authored
      These prototypes were required when compiling GDB as C but are not
      required for C++.
      	* aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
      	* aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
      	* aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
      	* aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
      	* ada-exp.y: Remove _initialize_ada_exp prototype.
      	* ada-lang.c: Remove _initialize_ada_language prototype.
      	* ada-tasks.c: Remove _initialize_tasks prototype.
      	* addrmap.c: Remove _initialize_addrmap prototype.
      	* agent.c: Remove _initialize_agent prototype.
      	* aix-thread.c: Remove _initialize_aix_thread prototype.
      	* alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
      	* alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
      	* alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
      	* alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
      	* alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
      	* alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
      	* amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
      	* amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
      	* amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
      	* amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
      	* amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
      	* amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
      	* amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
      	* amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
      	* amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
      	* amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
      	* amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
      	* amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
      	* amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
      	* amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
      	* annotate.c: Remove _initialize_annotate prototype.
      	* arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
      	* arc-tdep.c: Remove _initialize_arc_tdep prototype.
      	* arch-utils.c: Remove _initialize_gdbarch_utils prototype.
      	* arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
      	* arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
      	* arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
      	* arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
      	* arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
      	* arm-tdep.c: Remove _initialize_arm_tdep prototype.
      	* arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
      	* auto-load.c: Remove _initialize_auto_load prototype.
      	* auxv.c: Remove _initialize_auxv prototype.
      	* avr-tdep.c: Remove _initialize_avr_tdep prototype.
      	* ax-gdb.c: Remove _initialize_ax_gdb prototype.
      	* bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
      	* bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
      	* break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
      	* break-catch-syscall.c: Remove _initialize_break_catch_syscall
      	* break-catch-throw.c: Remove _initialize_break_catch_throw
      	* breakpoint.c: Remove _initialize_breakpoint prototype.
      	* bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
      	* btrace.c: Remove _initialize_btrace prototype.
      	* charset.c: Remove _initialize_charset prototype.
      	* cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
      	* cli/cli-dump.c: Remove _initialize_cli_dump prototype.
      	* cli/cli-interp.c: Remove _initialize_cli_interp prototype.
      	* cli/cli-logging.c: Remove _initialize_cli_logging prototype.
      	* cli/cli-script.c: Remove _initialize_cli_script prototype.
      	* coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
      	* coffread.c: Remove _initialize_coffread prototype.
      	* compile/compile.c: Remove _initialize_compile prototype.
      	* complaints.c: Remove _initialize_complaints prototype.
      	* completer.c: Remove _initialize_completer prototype.
      	* copying.awk: Remove _initialize_copying prototype.
      	* copying.c: Regenerate.
      	* core-regset.c: Remove _initialize_core_regset prototype.
      	* corefile.c: Remove _initialize_core prototype.
      	* corelow.c: Remove _initialize_corelow prototype.
      	* cp-abi.c: Remove _initialize_cp_abi prototype.
      	* cp-namespace.c: Remove _initialize_cp_namespace prototype.
      	* cp-support.c: Remove _initialize_cp_support prototype.
      	* cp-valprint.c: Remove _initialize_cp_valprint prototype.
      	* cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
      	* cris-tdep.c: Remove _initialize_cris_tdep prototype.
      	* ctf.c: Remove _initialize_ctf prototype.
      	* d-lang.c: Remove _initialize_d_language prototype.
      	* darwin-nat-info.c: Remove _initialize_darwin_info_commands
      	* darwin-nat.c: Remove _initialize_darwin_inferior prototype.
      	* dbxread.c: Remove _initialize_dbxread prototype.
      	* dcache.c: Remove _initialize_dcache prototype.
      	* demangle.c: Remove _initialize_demangler prototype.
      	* disasm-selftests.c: Remove _initialize_disasm_selftests
      	* disasm.c: Remove _initialize_disasm prototype.
      	* dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
      	* dummy-frame.c: Remove _initialize_dummy_frame prototype.
      	* dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
      	* dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
      	* dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
      	* dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
      	* dwarf2read.c: Remove _initialize_dwarf2_read prototype.
      	* elfread.c: Remove _initialize_elfread prototype.
      	* exec.c: Remove _initialize_exec prototype.
      	* extension.c: Remove _initialize_extension prototype.
      	* f-lang.c: Remove _initialize_f_language prototype.
      	* f-valprint.c: Remove _initialize_f_valprint prototype.
      	* fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
      	* fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
      	* filesystem.c: Remove _initialize_filesystem prototype.
      	* findcmd.c: Remove _initialize_mem_search prototype.
      	* fork-child.c: Remove _initialize_fork_child prototype.
      	* frame-base.c: Remove _initialize_frame_base prototype.
      	* frame-unwind.c: Remove _initialize_frame_unwind prototype.
      	* frame.c: Remove _initialize_frame prototype.
      	* frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
      	* frv-tdep.c: Remove _initialize_frv_tdep prototype.
      	* ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
      	* gcore.c: Remove _initialize_gcore prototype.
      	* gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
      	* gdbarch.c: Regenerate.
      	* gdbarch.sh: Remove _initialize_gdbarch prototype.
      	* gdbtypes.c: Remove _initialize_gdbtypes prototype.
      	* gnu-nat.c: Remove _initialize_gnu_nat prototype.
      	* gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
      	* gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
      	* go-lang.c: Remove _initialize_go_language prototype.
      	* go32-nat.c: Remove _initialize_go32_nat prototype.
      	* guile/guile.c: Remove _initialize_guile prototype.
      	* h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
      	* hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
      	* hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
      	* hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
      	* hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
      	* hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
      	* hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
      	* hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
      	* i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
      	* i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
      	* i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
      	* i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
      	* i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
      	* i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
      	* i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
      	* i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
      	* i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
      	* i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
      	* i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
      	* i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
      	* i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
      	* i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
      	* i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
      	* i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
      	* i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
      	* i386-tdep.c: Remove _initialize_i386_tdep prototype.
      	* i386-windows-nat.c: Remove _initialize_i386_windows_nat
      	* ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
      	* ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
      	* ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
      	* ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
      	* ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
      	* infcall.c: Remove _initialize_infcall prototype.
      	* infcmd.c: Remove _initialize_infcmd prototype.
      	* inferior.c: Remove _initialize_inferiors prototype.
      	* inflow.c: Remove _initialize_inflow prototype.
      	* infrun.c: Remove _initialize_infrun prototype.
      	* interps.c: Remove _initialize_interpreter prototype.
      	* iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
      	* jit.c: Remove _initialize_jit prototype.
      	* language.c: Remove _initialize_language prototype.
      	* linux-fork.c: Remove _initialize_linux_fork prototype.
      	* linux-nat.c: Remove _initialize_linux_nat prototype.
      	* linux-tdep.c: Remove _initialize_linux_tdep prototype.
      	* linux-thread-db.c: Remove _initialize_thread_db prototype.
      	* lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
      	* m2-lang.c: Remove _initialize_m2_language prototype.
      	* m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
      	* m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
      	* m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
      	* m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
      	* m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
      	* m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
      	* m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
      	* m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
      	* m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
      	* m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
      	* m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
      	* m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
      	* machoread.c: Remove _initialize_machoread prototype.
      	* macrocmd.c: Remove _initialize_macrocmd prototype.
      	* macroscope.c: Remove _initialize_macroscope prototype.
      	* maint.c: Remove _initialize_maint_cmds prototype.
      	* mdebugread.c: Remove _initialize_mdebugread prototype.
      	* memattr.c: Remove _initialize_mem prototype.
      	* mep-tdep.c: Remove _initialize_mep_tdep prototype.
      	* mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
      	* mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
      	* mi/mi-interp.c: Remove _initialize_mi_interp prototype.
      	* mi/mi-main.c: Remove _initialize_mi_main prototype.
      	* microblaze-linux-tdep.c: Remove
      	_initialize_microblaze_linux_tdep prototype.
      	* microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
      	* mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
      	* mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
      	* mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
      	* mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
      	* mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
      	* mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
      	* mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
      	* mips-tdep.c: Remove _initialize_mips_tdep prototype.
      	* mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
      	* mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
      	* mipsread.c: Remove _initialize_mipsread prototype.
      	* mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
      	* mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
      	* moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
      	* msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
      	* mt-tdep.c: Remove _initialize_mt_tdep prototype.
      	* nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
      	* nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
      	* nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
      	* nto-procfs.c: Remove _initialize_procfs prototype.
      	* nto-tdep.c: Remove _initialize_nto_tdep prototype.
      	* objc-lang.c: Remove _initialize_objc_language prototype.
      	* objfiles.c: Remove _initialize_objfiles prototype.
      	* observer.c: Remove observer_test_first_notification_function,
      	observer_test_third_notification_function, and
      	_initialize_observer prototypes.
      	* opencl-lang.c: Remove _initialize_opencl_language prototypes.
      	* osabi.c: Remove _initialize_gdb_osabi prototype.
      	* osdata.c: Remove _initialize_osdata prototype.
      	* p-valprint.c: Remove _initialize_pascal_valprint prototype.
      	* parse.c: Remove _initialize_parse prototype.
      	* ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
      	* ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
      	* ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
      	* ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
      	* ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
      	* ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
      	* ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
      	* ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
      	* printcmd.c: Remove _initialize_printcmd prototype.
      	* probe.c: Remove _initialize_probe prototype.
      	* proc-api.c: Remove _initialize_proc_api prototype.
      	* proc-events.c: Remove _initialize_proc_events prototype.
      	* proc-service.c: Remove _initialize_proc_service prototype.
      	* procfs.c: Remove _initialize_procfs prototype.
      	* psymtab.c: Remove _initialize_psymtab prototype.
      	* python/python.c: Remove _initialize_python prototype.
      	* ravenscar-thread.c: Remove _initialize_ravenscar prototype.
      	* record-btrace.c: Remove _initialize_record_btrace prototype.
      	* record-full.c: Remove _initialize_record_full prototype.
      	* record.c: Remove _initialize_record prototype.
      	* regcache.c: Remove _initialize_regcache prototype.
      	* reggroups.c: Remove _initialize_reggroup prototype.
      	* remote-notif.c: Remove _initialize_notif prototype.
      	* remote-sim.c: Remove _initialize_remote_sim prototype.
      	* remote.c: Remove _initialize_remote prototype.
      	* reverse.c: Remove _initialize_reverse prototype.
      	* rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
      	* rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
      	* rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
      	* rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
      	* rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
      	* rust-exp.y: Remove _initialize_rust_exp prototype.
      	* rx-tdep.c: Remove _initialize_rx_tdep prototype.
      	* s390-linux-nat.c: Remove _initialize_s390_nat prototype.
      	* s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
      	* score-tdep.c: Remove _initialize_score_tdep prototype.
      	* selftest-arch.c: Remove _initialize_selftests_foreach_arch
      	* ser-go32.c: Remove _initialize_ser_dos prototype.
      	* ser-mingw.c: Remove _initialize_ser_windows prototype.
      	* ser-pipe.c: Remove _initialize_ser_pipe prototype.
      	* ser-tcp.c: Remove _initialize_ser_tcp prototype.
      	* ser-unix.c: Remove _initialize_ser_hardwire prototype.
      	* serial.c: Remove _initialize_serial prototype.
      	* sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
      	* sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
      	* sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
      	* sh-tdep.c: Remove _initialize_sh_tdep prototype.
      	* skip.c: Remove _initialize_step_skip prototype.
      	* sol-thread.c: Remove _initialize_sol_thread prototype.
      	* solib-aix.c: Remove _initialize_solib_aix prototype.
      	* solib-darwin.c: Remove _initialize_darwin_solib prototype.
      	* solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
      	* solib-frv.c: Remove _initialize_frv_solib prototype.
      	* solib-spu.c: Remove _initialize_spu_solib prototype.
      	* solib-svr4.c: Remove _initialize_svr4_solib prototype.
      	* solib-target.c: Remove _initialize_solib_target prototype.
      	* solib.c: Remove _initialize_solib prototype.
      	* source.c: Remove _initialize_source prototype.
      	* sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
      	* sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
      	* sparc-nat.c: Remove _initialize_sparc_nat prototype.
      	* sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
      	* sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
      	* sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
      	* sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
      	* sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
      	* sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
      	* sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
      	* sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
      	* sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
      	* sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
      	* sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
      	* sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
      	* sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
      	* sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
      	* sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
      	* sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
      	* spu-linux-nat.c: Remove _initialize_spu_nat prototype.
      	* spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
      	* spu-tdep.c: Remove _initialize_spu_tdep prototype.
      	* stabsread.c: Remove _initialize_stabsread prototype.
      	* stack.c: Remove _initialize_stack prototype.
      	* stap-probe.c: Remove _initialize_stap_probe prototype.
      	* std-regs.c: Remove _initialize_frame_reg prototype.
      	* symfile-debug.c: Remove _initialize_symfile_debug prototype.
      	* symfile-mem.c: Remove _initialize_symfile_mem prototype.
      	* symfile.c: Remove _initialize_symfile prototype.
      	* symmisc.c: Remove _initialize_symmisc prototype.
      	* symtab.c: Remove _initialize_symtab prototype.
      	* target-dcache.c: Remove _initialize_target_dcache prototype.
      	* target-descriptions.c: Remove _initialize_target_descriptions
      	* thread.c: Remove _initialize_thread prototype.
      	* tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
      	* tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
      	* tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
      	* tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
      	* tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
      	* tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
      	* tracefile.c: Remove _initialize_tracefile prototype.
      	* tracepoint.c: Remove _initialize_tracepoint prototype.
      	* tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
      	* tui/tui-interp.c: Remove _initialize_tui_interp prototype.
      	* tui/tui-layout.c: Remove _initialize_tui_layout prototype.
      	* tui/tui-regs.c: Remove _initialize_tui_regs prototype.
      	* tui/tui-stack.c: Remove _initialize_tui_stack prototype.
      	* tui/tui-win.c: Remove _initialize_tui_win prototype.
      	* tui/tui.c: Remove _initialize_tui prototype.
      	* typeprint.c: Remove _initialize_typeprint prototype.
      	* user-regs.c: Remove _initialize_user_regs prototype.
      	* utils.c: Remove _initialize_utils prototype.
      	* v850-tdep.c: Remove _initialize_v850_tdep prototype.
      	* valarith.c: Remove _initialize_valarith prototype.
      	* valops.c: Remove _initialize_valops prototype.
      	* valprint.c: Remove _initialize_valprint prototype.
      	* value.c: Remove _initialize_values prototype.
      	* varobj.c: Remove _initialize_varobj prototype.
      	* vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
      	* vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
      	* vax-tdep.c: Remove _initialize_vax_tdep prototype.
      	* windows-nat.c: Remove _initialize_windows_nat,
      	_initialize_check_for_gdb_ini, and _initialize_loadable
      	* windows-tdep.c: Remove _initialize_windows_tdep prototype.
      	* xcoffread.c: Remove _initialize_xcoffread prototype.
      	* xml-support.c: Remove _initialize_xml_support prototype.
      	* xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
      	* xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
      	* xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
      	* xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.