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.
This commit is contained in:
parent
e31806255f
commit
e9bcb65852
12 changed files with 148 additions and 81 deletions
|
@ -51,7 +51,7 @@ struct catcher
|
|||
{
|
||||
enum catcher_state state;
|
||||
/* Jump buffer pointing back at the exception handler. */
|
||||
EXCEPTIONS_SIGJMP_BUF buf;
|
||||
SIGJMP_BUF buf;
|
||||
/* Status buffer belonging to the exception handler. */
|
||||
volatile struct gdb_exception *exception;
|
||||
/* Saved/current state. */
|
||||
|
@ -80,7 +80,7 @@ catcher_list_size (void)
|
|||
return size;
|
||||
}
|
||||
|
||||
EXCEPTIONS_SIGJMP_BUF *
|
||||
SIGJMP_BUF *
|
||||
exceptions_state_mc_init (volatile struct gdb_exception *exception,
|
||||
return_mask mask)
|
||||
{
|
||||
|
@ -229,7 +229,7 @@ throw_exception (struct gdb_exception exception)
|
|||
be zero, by definition in defs.h. */
|
||||
exceptions_state_mc (CATCH_THROWING);
|
||||
*current_catcher->exception = exception;
|
||||
EXCEPTIONS_SIGLONGJMP (current_catcher->buf, exception.reason);
|
||||
SIGLONGJMP (current_catcher->buf, exception.reason);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue