aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-support.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-08-07 15:53:21 +0100
committerGary Benson <gbenson@redhat.com>2014-08-29 10:53:36 +0100
commite9bcb6585201ab674d90d714295f63b40da41f16 (patch)
tree0f9c692937bd00e832170a137fed9eb17c4e188d /gdb/cp-support.c
parente31806255fe0cf49a1eeb14a51788473eaaa6310 (diff)
Introduce common/gdb_setjmp.h
This commit creates a new file, common/gdb_setjmp.h, to hold some portability macros for setjmp/longjmp et al. that are used by the exceptions subsystem and by the demangler crash catcher. gdb/ChangeLog: * common/gdb_setjmp.h: New file. * Makefile.in (HFILES_NO_SRCDIR): Add common/gdb_setjmp.h. * configure.ac: Move sigsetjmp check... * common/common.m4: ...here. * configure: Regenerate. * cp-support.c (SIGJMP_BUF): Delete. (SIGSETJMP): Likewise. (SIGLONGJMP): Likewise. * exceptions.h (gdb_setjmp.h): Include. (setjmp.h): Do not include. (EXCEPTIONS_SIGJMP_BUF): Delete. (EXCEPTIONS_SIGSETJMP): Likewise. (EXCEPTIONS_SIGLONGJMP): Likewise. Replace all uses of EXCEPTIONS_SIG* macros with SIG* macros from gdb_setjmp.h. * exceptions.c: Likewise. gdb/gdbserver/ChangeLog: * config.in: Regenerate. * configure: Likewise.
Diffstat (limited to 'gdb/cp-support.c')
-rw-r--r--gdb/cp-support.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 20a4a073ea..14aaac8ad0 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -1488,18 +1488,6 @@ cp_lookup_rtti_type (const char *name, struct block *block)
static int catch_demangler_crashes = 1;
-/* Wrap set/long jmp so that it's more portable. */
-
-#if defined(HAVE_SIGSETJMP)
-#define SIGJMP_BUF sigjmp_buf
-#define SIGSETJMP(buf) sigsetjmp((buf), 1)
-#define SIGLONGJMP(buf,val) siglongjmp((buf), (val))
-#else
-#define SIGJMP_BUF jmp_buf
-#define SIGSETJMP(buf) setjmp(buf)
-#define SIGLONGJMP(buf,val) longjmp((buf), (val))
-#endif
-
/* Stack context and environment for demangler crash recovery. */
static SIGJMP_BUF gdb_demangle_jmp_buf;