gdb: Improve scoped_switch_fork_info class
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 9 Jan 2019 14:02:39 +0000 (14:02 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 10 Jan 2019 16:15:30 +0000 (16:15 +0000)
commit1ef8573cc77c91feeef3edab74d383d20809eb33
treef2f67317d9c4cf33fe9130f622f2759ac1511e68
parent59aa9b0be159002e2eb971176921dc1e9c8045cf
gdb: Improve scoped_switch_fork_info class

After committing this patch I got this feedback:

   https://sourceware.org/ml/gdb-patches/2019-01/msg00181.html

This patch makes the constructor of scoped_switch_fork_info explicit,
and wraps the core of the destructor in a TRY/CATCH block.

I've run this through the testsuite on X86-64/GNU Linux, however, this
code is not exercised, so this patch is untested.

gdb/ChangeLog:

* linux-fork.c (scoped_switch_fork_info)
<scoped_switch_fork_info>: Make explicit.
<~scoped_switch_fork_info>: Wrap core in TRY/CATCH.
gdb/ChangeLog
gdb/linux-fork.c