Skip to content
Commit 0f93c3a2 authored by Andrew Burgess's avatar Andrew Burgess
Browse files

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.
parent f237f998
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment