aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib/compiler.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-05-14 10:35:54 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-06-24 12:04:40 +0100
commita32c1a92d5d5a8ed32cb30b161daedb1aca72cb4 (patch)
treeac72642aa88d105b9a313df9d8bfe0d91f9fb6bb /gdb/testsuite/lib/compiler.c
parent39b8a8090ed7e8967ceca3655aa5f3a2ae91219d (diff)
downloadbinutils-a32c1a92d5d5a8ed32cb30b161daedb1aca72cb4.zip
binutils-a32c1a92d5d5a8ed32cb30b161daedb1aca72cb4.tar.gz
binutils-a32c1a92d5d5a8ed32cb30b161daedb1aca72cb4.tar.bz2
gdb: make use of RAII in run_inferior_call
In passing I noticed that there are three local variables in run_inferior_call that are used to save, and then restore some state, I think these could all be replaced with a RAII style scoped_restore instead. Of the three locals that I've changed, the only one that I believe is now restored in a different location is ui::async, before this commit the async field was restored after a call to either delete_file_handle or ui_register_input_event_handler, and after this commit, the field is restored before these calls. However, I don't believe that either of these functions depend on the value of the async field, so I believe the commit is fine. Tested on x86-64/Linux passes with no regressions.
Diffstat (limited to 'gdb/testsuite/lib/compiler.c')
0 files changed, 0 insertions, 0 deletions