From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MesIW-0000ip-Dw for qemu-devel@nongnu.org; Sat, 22 Aug 2009 11:14:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MesIR-0000iJ-KW for qemu-devel@nongnu.org; Sat, 22 Aug 2009 11:14:27 -0400 Received: from [199.232.76.173] (port=36034 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MesIR-0000iG-F2 for qemu-devel@nongnu.org; Sat, 22 Aug 2009 11:14:23 -0400 Received: from mail-fx0-f211.google.com ([209.85.220.211]:55134) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MesIR-0000JJ-4J for qemu-devel@nongnu.org; Sat, 22 Aug 2009 11:14:23 -0400 Received: by fxm7 with SMTP id 7so1036799fxm.34 for ; Sat, 22 Aug 2009 08:14:22 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <526ddcfc0908201743x2d37a468s29c9388007060f6f@mail.gmail.com> References: <526ddcfc0908201743x2d37a468s29c9388007060f6f@mail.gmail.com> From: Blue Swirl Date: Sat, 22 Aug 2009 18:14:02 +0300 Message-ID: Subject: Re: [Qemu-devel] Qemu user-mode MacOS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Toni Cc: qemu-devel@nongnu.org On Fri, Aug 21, 2009 at 3:43 AM, Toni wrote: > Hi, > I have a problem: I'm trying to install on Mac OS qemu user-mode, I need = it, > and so I find out that the only way is correct the wrong part of the sour= ce > code of qemu darwin_user, I correct some errors, but now I found out > something that I don't undestand: > =C2=A0=C2=A0CC =C2=A0 =C2=A0i386-darwin-user/cpu-exec.o > /Users/ToNy/Desktop/qemu-0.10.5_prova/cpu-exec.c: In function > =E2=80=98cpu_x86_signal_handler=E2=80=99: > /Users/ToNy/Desktop/qemu-0.10.5_prova/cpu-exec.c:1182: error: dereferenci= ng > pointer to incomplete type > /Users/ToNy/Desktop/qemu-0.10.5_prova/cpu-exec.c:1183: error: dereferenci= ng > pointer to incomplete type > /Users/ToNy/Desktop/qemu-0.10.5_prova/cpu-exec.c:1186: error: dereferenci= ng > pointer to incomplete type > /Users/ToNy/Desktop/qemu-0.10.5_prova/cpu-exec.c:1187: error: dereferenci= ng > pointer to incomplete type > the problem may be the ucontext definition=C2=A0of the uc variable,=C2=A0= that is > defined in=C2=A0sys/ucontext.h,=C2=A0that call=C2=A0_structs.h where fina= lly we found the > struct: Maybe struct mcontext is not defined? You could try splitting the code to pieces, each trying one step in the pointer reference chain: Instead of # define EIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->ss.e= ip)) you could try something like struct mcontext *mc; struct sigaltstack *ss; mc =3D uc->uc_mcontext; ss =3D mc->ss; pc =3D ss->eip;