| @@ -1207,7 +1207,7 @@ static int rt_error(rt_frame *f, const char *fmt, ...) · 1206 unmodified lines |
| 1207 | 1207 | |
| 1208 | 1208 | #ifndef _WIN32 |
| 1209 | 1209 | # include <signal.h> |
| 1210 | | −# ifndef __OpenBSD__ |
| 1210 | +# if !defined(__OpenBSD__) && !defined(__HAIKU__) |
| 1211 | 1211 | # include <sys/ucontext.h> |
| 1212 | 1212 | # endif |
| 1213 | 1213 | #else |
| @@ -1236,7 +1236,7 @@ static void rt_getcontext(ucontext_t *uc, rt_frame *rc) · 22 unmodified lines |
| 1236 | 1236 | # elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) |
| 1237 | 1237 | rc->ip = uc->uc_mcontext.mc_eip; |
| 1238 | 1238 | rc->fp = uc->uc_mcontext.mc_ebp; |
| 1239 | | −# elif defined(__dietlibc__) |
| 1239 | +# elif defined(__dietlibc__) || defined(__HAIKU__) |
| 1240 | 1240 | rc->ip = uc->uc_mcontext.eip; |
| 1241 | 1241 | rc->fp = uc->uc_mcontext.ebp; |
| 1242 | 1242 | # elif defined(__NetBSD__) |
| @@ -1265,6 +1265,9 @@ static void rt_getcontext(ucontext_t *uc, rt_frame *rc) · 22 unmodified lines |
| 1265 | 1265 | # elif defined(__OpenBSD__) |
| 1266 | 1266 | rc->ip = uc->sc_rip; |
| 1267 | 1267 | rc->fp = uc->sc_rbp; |
| 1268 | +# elif defined(__HAIKU__) |
| 1269 | + rc->ip = uc->uc_mcontext.rip; |
| 1270 | + rc->fp = uc->uc_mcontext.rbp; |
| 1268 | 1271 | # else |
| 1269 | 1272 | rc->ip = uc->uc_mcontext.gregs[REG_RIP]; |
| 1270 | 1273 | rc->fp = uc->uc_mcontext.gregs[REG_RBP]; |
| @@ -1275,6 +1278,9 @@ static void rt_getcontext(ucontext_t *uc, rt_frame *rc) · 4 unmodified lines |
| 1275 | 1278 | #elif defined(__arm__) && defined(__OpenBSD__) |
| 1276 | 1279 | rc->ip = uc->sc_pc; |
| 1277 | 1280 | rc->fp = uc->sc_r11; |
| 1281 | +#elif defined(__arm__) && defined(__HAIKU__) |
| 1282 | + rc->ip = uc->r15; |
| 1283 | + rc->fp = uc->r11; |
| 1278 | 1284 | #elif defined(__arm__) && defined(__FreeBSD__) |
| 1279 | 1285 | rc->ip = uc->uc_mcontext.__gregs[_REG_PC]; |
| 1280 | 1286 | rc->fp = uc->uc_mcontext.__gregs[_REG_FP]; |
| @@ -1295,6 +1301,9 @@ static void rt_getcontext(ucontext_t *uc, rt_frame *rc) · 14 unmodified lines |
| 1295 | 1301 | #elif defined(__aarch64__) && defined(__OpenBSD__) |
| 1296 | 1302 | rc->ip = uc->sc_elr; |
| 1297 | 1303 | rc->fp = uc->sc_x[29]; |
| 1304 | +#elif defined(__aarch64__) && defined(__HAIKU__) |
| 1305 | + rc->ip = uc->elr; |
| 1306 | + rc->fp = uc->x[29]; |
| 1298 | 1307 | #elif defined(__aarch64__) |
| 1299 | 1308 | rc->ip = uc->uc_mcontext.pc; |
| 1300 | 1309 | rc->fp = uc->uc_mcontext.regs[29]; |