+/* As of XCode 3.0, the field names for the thread state have changed
+ * and now are prepended with __. Use some #define hackery to deal
+ * with this. MAC_OS_X_VERSION_10_5 seems to be a good test to see if
+ * we need the new style field names.
+ */
+#if MAC_OS_X_VERSION_10_5
+
+#define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext->__ss.__##stem
+#define EIP __eip
+#define ESP __esp
+#define EBP __ebp
+#define EAX __eax
+#define EBX __ebx
+#define ECX __ecx
+#define EDX __edx
+#define ESI __esi
+#define EDI __edi
+#define EFLAGS __eflags
+#define CS __cs
+#define DS __ds
+#define ES __es
+#define FS __fs
+#define SS __ss
+#define GS __gs
+
+#else
+