+2016-04-12 Pedro Alves <palves@redhat.com>
+
+ * common/common-exceptions.c (struct catcher) <buf>: Now a
+ 'jmp_buf' instead of SIGJMP_BUF.
+ (exceptions_state_mc_init): Change return type to 'jmp_buf'.
+ (throw_exception): Use longjmp instead of SIGLONGJMP.
+ * common/common-exceptions.h: Include <setjmp.h> instead of
+ "gdb_setjmp.h".
+ (exceptions_state_mc_init): Change return type to 'jmp_buf'.
+ [GDB_XCPT == GDB_XCPT_SJMP] (TRY): Use setjmp instead of
+ SIGSETJMP.
+ * cp-support.c: Include "gdb_setjmp.h".
+
2016-04-12 Pedro Alves <palves@redhat.com>
* common/common-exceptions.c (exception_rethrow): Remove
{
enum catcher_state state;
/* Jump buffer pointing back at the exception handler. */
- SIGJMP_BUF buf;
+ jmp_buf buf;
/* Status buffer belonging to the exception handler. */
struct gdb_exception exception;
struct cleanup *saved_cleanup_chain;
return size;
}
-SIGJMP_BUF *
+jmp_buf *
exceptions_state_mc_init (void)
{
struct catcher *new_catcher = XCNEW (struct catcher);
be zero, by definition in defs.h. */
exceptions_state_mc (CATCH_THROWING);
current_catcher->exception = exception;
- SIGLONGJMP (current_catcher->buf, exception.reason);
+ longjmp (current_catcher->buf, exception.reason);
#else
if (exception.reason == RETURN_QUIT)
{
#ifndef COMMON_EXCEPTIONS_H
#define COMMON_EXCEPTIONS_H
-#include "gdb_setjmp.h"
+#include <setjmp.h>
/* Reasons for calling throw_exceptions(). NOTE: all reason values
must be less than zero. enum value 0 is reserved for internal use
macros defined below. */
#if GDB_XCPT == GDB_XCPT_SJMP
-extern SIGJMP_BUF *exceptions_state_mc_init (void);
+extern jmp_buf *exceptions_state_mc_init (void);
extern int exceptions_state_mc_action_iter (void);
extern int exceptions_state_mc_action_iter_1 (void);
extern int exceptions_state_mc_catch (struct gdb_exception *, int);
#define TRY \
{ \
- SIGJMP_BUF *buf = \
+ jmp_buf *buf = \
exceptions_state_mc_init (); \
- SIGSETJMP (*buf); \
+ setjmp (*buf); \
} \
while (exceptions_state_mc_action_iter ()) \
while (exceptions_state_mc_action_iter_1 ())
#include "cp-abi.h"
#include "namespace.h"
#include <signal.h>
-
+#include "gdb_setjmp.h"
#include "safe-ctype.h"
#define d_left(dc) (dc)->u.s_binary.left