gdb: remove unneeded switch_to_thread from thr_try_catch_cmd
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 27 Jan 2021 18:20:35 +0000 (18:20 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 28 Jan 2021 20:04:48 +0000 (20:04 +0000)
commit0f93c3a25bbfbdfeea92f27f591c88e7daeb9a70
tree00e62ee66218a7247d296c5ea6c8a0126cded1a9
parentf237f998d1168139d599c550d54169cd8f94052d
gdb: remove unneeded switch_to_thread from thr_try_catch_cmd

I spotted that every time thr_try_catch_cmd is called GDB has already
switched to the required thread.  The call to switch_to_thread at the
head of thr_try_catch_cmd is therefore redundant.

This commit replaces the call to switch_to_thread with an assertion
that we already have the required thread selected.

I also extended the header comment on thr_try_catch_cmd to make it
clearer when this function could throw an exception.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* thread.c (thr_try_catch_cmd): Replace swith_to_thread with an
assert.  Extend the header comment.
gdb/ChangeLog
gdb/thread.c
This page took 0.025762 seconds and 4 git commands to generate.