+2016-04-12 Pedro Alves <palves@redhat.com>
+
+ * common/common-exceptions.h (GDB_XCPT_TRY): Update comment.
+ [__cplusplus] (GDB_XCPT): Define as GDB_XCPT_TRY.
+
2016-04-12 Pedro Alves <palves@redhat.com>
* common/common-exceptions.c (struct catcher) <buf>: Now a
the only mode supported when GDB is built as a C program. */
#define GDB_XCPT_SJMP 1
-/* Make GDB exceptions use try/catch behind the scenes. Can't be made
- the default until we stop throwing exceptions from signal
- handlers. */
+/* Make GDB exceptions use try/catch behind the scenes. */
#define GDB_XCPT_TRY 2
/* Specify this mode to build with TRY/CATCH mapped directly to raw
spurious code between the TRY and the CATCH block. */
#define GDB_XCPT_RAW_TRY 3
-/* Always use setjmp/longmp, even in C++ mode. */
-#define GDB_XCPT GDB_XCPT_SJMP
+#ifdef __cplusplus
+# define GDB_XCPT GDB_XCPT_TRY
+#else
+# define GDB_XCPT GDB_XCPT_SJMP
+#endif
/* Functions to drive the exceptions state machine. Though declared
here by necessity, these functions should be considered internal to