From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A7Did-0006SW-CJ for qemu-devel@nongnu.org; Wed, 08 Oct 2003 08:47:07 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A7Dhf-0004zd-Rl for qemu-devel@nongnu.org; Wed, 08 Oct 2003 08:46:38 -0400 Received: from [66.199.135.5] (helo=ms0.sea.apvio.net) by monty-python.gnu.org with smtp (Exim 4.24) id 1A7DhI-0004m0-24 for qemu-devel@nongnu.org; Wed, 08 Oct 2003 08:45:44 -0400 Message-ID: <61829.67.168.46.137.1065617133.squirrel@mail.apvio.net> Date: Wed, 8 Oct 2003 05:45:33 -0700 (PDT) From: qemu@raylucke.com MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Subject: [Qemu-devel] uc_mcontext differences between Darwin and Linux Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org In cpu-exec.c, you reference the mcontext struct. The Darwin structs are a bit different. Attached below are snippets of relevent code from the header files. What is necessary for me to do to your code to make it work with the darwin mcontext structs? Some of it seems obvious, but since you are much more intimately familiar with your code, I figure you might have some valuable input. So far, I have changed lines like: struct pt_regs *regs = uc->uc_mcontext.regs; to: struct pt_regs *regs = uc->uc_mcontext->ss; Which actually is not going to compile in the end anyway. What is pt_regs? I cannot find it defined anywhere. Ray --- struct mcontext { ppc_exception_state_t es; ppc_thread_state_t ss; ppc_float_state_t fs; ppc_vector_state_t vs; }; typedef struct ppc_thread_state { unsigned int srr0; /* Instruction address register (PC) */ unsigned int srr1; /* Machine state register (supervisor) */ unsigned int r0; unsigned int r1; unsigned int r2; ... ... unsigned int r30; unsigned int r31; unsigned int cr; /* Condition register */ unsigned int xer; /* User's integer exception register */ unsigned int lr; /* Link register */ unsigned int ctr; /* Count register */ unsigned int mq; /* MQ register (601 only) */ unsigned int vrsave; /* Vector Save Register */ } ppc_thread_state_t; typedef struct ppc_exception_state { unsigned long dar; /* Fault registers for coredump */ unsigned long dsisr; unsigned long exception;/* number of powerpc exception taken */ unsigned long pad0; /* align to 16 bytes */ unsigned long pad1[4]; /* space in PCB "just in case" */ } ppc_exception_state_t;