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.
This commit is contained in:
parent
0c1e6e265b
commit
fce6cd341b
3 changed files with 11 additions and 10 deletions
|
@ -399,6 +399,8 @@ target_can_async_p ()
|
|||
bool
|
||||
target_can_async_p (struct target_ops *target)
|
||||
{
|
||||
if (!target_async_permitted)
|
||||
return false;
|
||||
return target->can_async_p ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue