gdb: hoist target_async_permitted checks into target.c
authorAndrew Burgess <aburgess@redhat.com>
Wed, 24 Nov 2021 11:36:12 +0000 (11:36 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 25 Nov 2021 10:00:18 +0000 (10:00 +0000)
commitfce6cd341b48a2589cb4520c7718c80cb0b27c80
tree236e91b872a6a2a2753503bfd2d002365a8844d0
parent0c1e6e265b276542ccb3f392c3070c3dd9339303
gdb: hoist target_async_permitted checks into target.c

This commit moves the target_async_permitted check out of each targets
::can_async_p method and into the target_can_async_p wrapper function.

I've left some asserts in the two ::can_async_p methods that I
changed, which will hopefully catch any direct calls to these methods
that might be added in the future.

There should be no user visible changes after this commit.
gdb/linux-nat.c
gdb/remote.c
gdb/target.c