[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tinycc on Mac

From: Daniel Glöckner
Subject: Re: [Tinycc-devel] tinycc on Mac
Date: Sat, 16 May 2009 10:54:53 +0200
User-agent: Mutt/

On Sat, May 16, 2009 at 09:41:17AM +0200, Francesco Turci wrote:
> tcc.c: In function ?rt_get_caller_pc?:
> tcc.c:9865: error: request for member ?gregs? in something not a  
> structure or union

Could you test the attached patch?
I don't have a Mac to test on.

I based the patch on this mail:

diff --git a/libtcc.c b/libtcc.c
index bca1946..8f02a58 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -1477,6 +1477,8 @@ static int rt_get_caller_pc(unsigned long *paddr,
         *paddr = uc->uc_mcontext.mc_eip;
 #elif defined(__dietlibc__)
         *paddr = uc->uc_mcontext.eip;
+#elif defined (__DARWIN__)
+        *paddr = uc->uc_mcontext->ss.eip;
         *paddr = uc->uc_mcontext.gregs[REG_EIP];
@@ -1486,6 +1488,8 @@ static int rt_get_caller_pc(unsigned long *paddr,
         fp = uc->uc_mcontext.mc_ebp;
 #elif defined(__dietlibc__)
         fp = uc->uc_mcontext.ebp;
+#elif defined (__DARWIN__)
+        fp = uc->uc_mcontext->ss.ebp;
         fp = uc->uc_mcontext.gregs[REG_EBP];

reply via email to

[Prev in Thread] Current Thread [Next in Thread]