]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add gdbserver target methods target_validate_tdesc and arch_setup
authorAlan Hayward <alan.hayward@arm.com>
Thu, 13 Sep 2018 15:48:51 +0000 (16:48 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Thu, 13 Sep 2018 15:48:51 +0000 (16:48 +0100)
commit182f44d67243a3270ec540e92a8ba6ea327ba004
tree213ef4b0ee0994961c0fbf412398d7a465b6bdf9
parentc749ff472db05b55b183eac3de5a0edd75798a56
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.
gdb/gdbserver/linux-aarch64-low.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/linux-low.h
gdb/gdbserver/target.h