Add gdbserver target methods target_validate_tdesc and arch_setup

target_validate_tdesc () is added as a new target function.
This function checks current target description is still valid for the
current inferior, returning false if not. On SVE, we need to check if the
vector length has changed - if it has then the current target descriptor
will need to be switched to a valid one.

The existing arch_setup () is extended to be a target function.
This will later allow it to be called from get_thread_regcache () in
gdbserver/regcache.c. This call is required to generate a new target
descriptor if we have decided the current one is no longer valid.

2018-09-13  Alan Hayward  <alan.hayward@arm.com>

gdbserver/
	* linux-aarch64-low.c (int aarch64_validate_tdesc): New function.
	(struct linux_target_ops): Add aarch64_validate_tdesc.
	* linux-low.c (linux_validate_tdesc): New function.
	(linux_target_ops): Add linux_arch_setup and linux_validate_tdesc.
	* linux-low.h (linux_target_ops): Add validate_tdesc.
	* target.h (struct target_ops): Likewise.
	(target_arch_setup) New macro.
	(target_validate_tdesc) New macro.
4 files changed