Pedro Alves a87c142792 Add missing-END_CATCH detection/protection (to gdb's TRY/CATCH/END_CATCH)
While we still have cleanups (i.e., make_cleanup & co), we must be
sure to add END_CATCH at the end of a TRY/CATCH/END_CATCH construct.
However, it's currently too easy to miss adding the END_CATCH, because
the code compiles anyway without it.  I realized this when I noticed
that another patch I was working on missed several adding END_CATCH in
several new TRY/CATCH uses.

This commit fixes that by making TRY open a new scope that is only
closed by END_CATCH.  This way, if you forget to add the END_CATCH,
then compilation fails due to the unbalanced curly braces.

This caught a couple places where we were missing END_CATCH in current
master, also fixed by the patch.

gdb/ChangeLog:
2017-10-04  Pedro Alves  <palves@redhat.com>

	* cli/cli-cmds.c (complete_command): Add missing END_CATCH.
	* common/common-exceptions.h (TRY): Open an outermost scope.
	Expand intro comment.
	(CATCH): Reindent.
	(END_CATCH): Close the outermost scope.
	* completer.c (complete_line_internal): Add missing END_CATCH.
2017-10-04 10:06:42 +01:00
..
2017-09-04 17:10:12 +01:00
2017-07-03 13:59:00 +02:00
2017-09-29 20:46:42 -06:00
2017-09-29 20:46:42 -06:00
2017-08-03 07:58:52 -06:00
2017-08-03 07:58:52 -06:00
2017-04-18 23:48:41 +01:00
2017-10-04 01:57:29 -04:00
2017-10-04 01:57:29 -04:00
2017-04-05 19:21:37 +01:00
2017-04-06 23:29:53 -04:00
2017-04-06 23:29:53 -04:00
2017-09-16 14:06:03 +02:00
2017-09-16 14:06:03 +02:00
2017-01-01 10:52:34 +04:00