mirror of
https://github.com/frida/tinycc
synced 2024-12-25 06:26:49 +03:00
tccrun: fix build on DragonFly BSD.
This commit is contained in:
parent
5f7cdd29b6
commit
8d3e0b3080
4
tccrun.c
4
tccrun.c
@ -528,7 +528,7 @@ static int rt_get_caller_pc(addr_t *paddr, ucontext_t *uc, int level)
|
|||||||
/* XXX: only support linux */
|
/* XXX: only support linux */
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
*paddr = uc->uc_mcontext->__ss.__rip;
|
*paddr = uc->uc_mcontext->__ss.__rip;
|
||||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||||
*paddr = uc->uc_mcontext.mc_rip;
|
*paddr = uc->uc_mcontext.mc_rip;
|
||||||
#else
|
#else
|
||||||
*paddr = uc->uc_mcontext.gregs[REG_RIP];
|
*paddr = uc->uc_mcontext.gregs[REG_RIP];
|
||||||
@ -537,7 +537,7 @@ static int rt_get_caller_pc(addr_t *paddr, ucontext_t *uc, int level)
|
|||||||
} else {
|
} else {
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
fp = uc->uc_mcontext->__ss.__rbp;
|
fp = uc->uc_mcontext->__ss.__rbp;
|
||||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||||
fp = uc->uc_mcontext.mc_rbp;
|
fp = uc->uc_mcontext.mc_rbp;
|
||||||
#else
|
#else
|
||||||
fp = uc->uc_mcontext.gregs[REG_RBP];
|
fp = uc->uc_mcontext.gregs[REG_RBP];
|
||||||
|
Loading…
Reference in New Issue
Block a user