From: qemu@raylucke.com
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] uc_mcontext differences between Darwin and Linux
Date: Wed, 8 Oct 2003 05:45:33 -0700 (PDT) [thread overview]
Message-ID: <61829.67.168.46.137.1065617133.squirrel@mail.apvio.net> (raw)
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;
... <snip> ...
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;
reply other threads:[~2003-10-08 12:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61829.67.168.46.137.1065617133.squirrel@mail.apvio.net \
--to=qemu@raylucke.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).