aboutsummaryrefslogtreecommitdiff
path: root/gdb/common/common-exceptions.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-10-06 19:23:37 +0100
committerPedro Alves <palves@redhat.com>2016-10-06 19:23:37 +0100
commitddb6d633875b76f9d772af901118233fc498253a (patch)
treeccd8e35d3579538c607829b41c050586104848ca /gdb/common/common-exceptions.h
parent33fa2c6e1b1e63599156f7d79de8c0a6ea69c8af (diff)
downloadgdb-ddb6d633875b76f9d772af901118233fc498253a.zip
gdb-ddb6d633875b76f9d772af901118233fc498253a.tar.gz
gdb-ddb6d633875b76f9d772af901118233fc498253a.tar.bz2
gdb: Remove some C compiler support leftovers
Remove some __cplusplus checks, inline EXPORTED_CONST, and update some comments. gdb/ChangeLog: 2016-10-06 Pedro Alves <palves@redhat.com> * cp-valprint.c (vtbl_ptr_name): Write "extern const" instead of EXPORTED_CONST. * stub-termcap.c: Remove __cplusplus checks. * common/common-defs.h [!__cplusplus] (EXTERN_C, EXTERN_C_PUSH, EXTERN_C_POP): Delete. * common/common-exceptions.h (GDB_XCPT_SJMP): Update comments. (GDB_XCPT) [!__cplusplus]: Delete. (throw_exception, throw_exception_sjlj): Update comments. * guile/guile-internal.h (as_a_scm_t_subr) [!__cplusplus]: Delete. * guile/guile.c (extension_language_guile): Write "extern const" instead of EXPORTED_CONST. * features/feature_to_c.sh: Don't emit !__cplusplus code. Write "extern const" instead of EXPORTED_CONST.
Diffstat (limited to 'gdb/common/common-exceptions.h')
-rw-r--r--gdb/common/common-exceptions.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h
index 6bf7e40..4cc56b4 100644
--- a/gdb/common/common-exceptions.h
+++ b/gdb/common/common-exceptions.h
@@ -119,8 +119,7 @@ struct gdb_exception
/* The different exception mechanisms that TRY/CATCH can map to. */
-/* Make GDB exceptions use setjmp/longjmp behind the scenes. This is
- the only mode supported when GDB is built as a C program. */
+/* Make GDB exceptions use setjmp/longjmp behind the scenes. */
#define GDB_XCPT_SJMP 1
/* Make GDB exceptions use try/catch behind the scenes. */
@@ -132,11 +131,7 @@ struct gdb_exception
spurious code between the TRY and the CATCH block. */
#define GDB_XCPT_RAW_TRY 3
-#ifdef __cplusplus
-# define GDB_XCPT GDB_XCPT_TRY
-#else
-# define GDB_XCPT GDB_XCPT_SJMP
-#endif
+#define GDB_XCPT GDB_XCPT_TRY
/* Functions to drive the sjlj-based exceptions state machine. Though
declared here by necessity, these functions should be considered
@@ -305,18 +300,16 @@ struct gdb_quit_bad_alloc
/* *INDENT-ON* */
-/* Throw an exception (as described by "struct gdb_exception"). When
- GDB is built as a C program, executes a LONG JUMP to the inner most
- containing exception handler established using TRY/CATCH. When
- built as a C++ program, throws a C++ exception, using "throw". */
+/* Throw an exception (as described by "struct gdb_exception"),
+ landing in the inner most containing exception handler established
+ using TRY/CATCH. */
extern void throw_exception (struct gdb_exception exception)
ATTRIBUTE_NORETURN;
/* Throw an exception by executing a LONG JUMP to the inner most
- containing exception handler established using TRY_SJLJ. Works the
- same regardless of whether GDB is built as a C program or a C++
- program. Necessary in some cases where we need to throw GDB
- exceptions across third-party library code (e.g., readline). */
+ containing exception handler established using TRY_SJLJ. Necessary
+ in some cases where we need to throw GDB exceptions across
+ third-party library code (e.g., readline). */
extern void throw_exception_sjlj (struct gdb_exception exception)
ATTRIBUTE_NORETURN;