aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2021-11-17 09:35:46 +0000
committerAndrew Burgess <aburgess@redhat.com>2021-11-25 10:00:40 +0000
commitbf94662bfe3ac43e792a4a6c44e35d7aafa9d0c1 (patch)
tree9f5a85c1bee6848ec5cd1ba810763e9013f9bbdb /gdb/python/python.c
parentfce6cd341b48a2589cb4520c7718c80cb0b27c80 (diff)
downloadbinutils-bf94662bfe3ac43e792a4a6c44e35d7aafa9d0c1.zip
binutils-bf94662bfe3ac43e792a4a6c44e35d7aafa9d0c1.tar.gz
binutils-bf94662bfe3ac43e792a4a6c44e35d7aafa9d0c1.tar.bz2
gdb: add asserts in target.c for target_async_permitted
The target_async_permitted flag allows a user to override whether a target can act in async mode or not. In previous commits I have moved the checking of this flag out of the various ::can_async_p methods and into the common target.c code. In this commit I will add some additional assertions into target_is_async_p and target_async. The rules these assertions are checking are: 1. A target that returns false for target_can_async_p should never become "async enabled", and so ::is_async_p should always return false. This is being checked in target_is_async_p. 2. GDB should never try to enable async mode for a target that returns false for target_can_async_p, this is checked in target_async. There are a few places where we call the ::is_async_p method directly, in these cases we will obviously not pass through the assert in target_is_async_p, however, there are also plenty of places where we do call target_is_async_p so if GDB starts to misbehave we should catch it quickly enough. There should be no user visible changes after this commit.
Diffstat (limited to 'gdb/python/python.c')
0 files changed, 0 insertions, 0 deletions