server: Set the context flags in get_thread_context to indicate which
parts of the returned context are valid.
diff --git a/server/context_sparc.c b/server/context_sparc.c
index 7da90ea..b718ff3 100644
--- a/server/context_sparc.c
+++ b/server/context_sparc.c
@@ -82,6 +82,7 @@
context->wim = 0; /* FIXME */
context->tbr = 0; /* FIXME */
}
+ context |= flags & (CONTEXT_CONTROL|CONTEXT_INTEGER);
}
if (flags & CONTEXT_FLOATING_POINT)
{
@@ -105,7 +106,7 @@
/* copy a context structure according to the flags */
-static void copy_context( CONTEXT *to, const CONTEXT *from, int flags )
+static void copy_context( CONTEXT *to, const CONTEXT *from, unsigned int flags )
{
if (flags & CONTEXT_CONTROL)
{
@@ -155,6 +156,7 @@
{
/* FIXME */
}
+ context |= flags & (CONTEXT_CONTROL|CONTEXT_INTEGER);
}
/* retrieve the current instruction pointer of a thread */
@@ -187,6 +189,7 @@
/* retrieve the thread context */
void get_thread_context( struct thread *thread, CONTEXT *context, unsigned int flags )
{
+ context->ContextFlags |= CONTEXT_SPARC;
flags &= ~CONTEXT_SPARC; /* get rid of CPU id */
if (thread->context) /* thread is inside an exception event or suspended */