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