[gdb] Eliminate catch(...) in target_wait

Remove duplicate code in target_wait using SCOPE_EXIT.

Tested on aarch64-linux.

Approved-By: Tom Tromey <tom@tromey.com>
1 file changed