Skip to content

ubuntu18 + gcc5.4 miss some definitions of ucontext #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions coffeecatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
/* #undef NO_USE_SIGALTSTACK */
/* #undef USE_SILENT_SIGALTSTACK */

// need by signal:ucontext for registers REG_xxx declare
#define _GNU_SOURCE

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
Expand Down Expand Up @@ -304,6 +307,9 @@ static native_code_global_struct native_code_g =
pthread_key_t native_code_thread;

#if (defined(USE_UNWIND) && !defined(USE_CORKSCREW))
#ifndef _URC_OK
#define _URC_OK _URC_NO_REASON
#endif
/* Unwind callback */
static _Unwind_Reason_Code
coffeecatch_unwind_callback(struct _Unwind_Context* context, void* arg) {
Expand Down Expand Up @@ -974,10 +980,14 @@ static const char* coffeecatch_desc_sig(int sig, int code) {
break;
case SIGTRAP:
switch(code) {
#ifdef TRAP_BRKPT
case TRAP_BRKPT:
return "Process breakpoint";
#endif
#ifdef TRAP_TRACE
case TRAP_TRACE:
return "Process trace trap";
#endif
default:
return "Trap";
}
Expand Down