server: Fix setting context flags in get_thread_context.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49011 Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c2854d8be2
commit
c3fac6e36c
|
@ -1175,6 +1175,20 @@ static void test_SetThreadContext(void)
|
||||||
CloseHandle( thread );
|
CloseHandle( thread );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_GetThreadContext(void)
|
||||||
|
{
|
||||||
|
CONTEXT ctx;
|
||||||
|
BOOL ret;
|
||||||
|
|
||||||
|
memset(&ctx, 0xcc, sizeof(ctx));
|
||||||
|
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
|
||||||
|
ret = GetThreadContext(GetCurrentThread(), &ctx);
|
||||||
|
ok(ret, "GetThreadContext failed: %u\n", GetLastError());
|
||||||
|
ok(ctx.ContextFlags == CONTEXT_DEBUG_REGISTERS, "ContextFlags = %x\n", ctx.ContextFlags);
|
||||||
|
ok(!ctx.Dr0, "Dr0 = %x\n", ctx.Dr0);
|
||||||
|
ok(!ctx.Dr1, "Dr0 = %x\n", ctx.Dr0);
|
||||||
|
}
|
||||||
|
|
||||||
static void test_GetThreadSelectorEntry(void)
|
static void test_GetThreadSelectorEntry(void)
|
||||||
{
|
{
|
||||||
LDT_ENTRY entry;
|
LDT_ENTRY entry;
|
||||||
|
@ -2379,6 +2393,7 @@ START_TEST(thread)
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
test_SetThreadContext();
|
test_SetThreadContext();
|
||||||
test_GetThreadSelectorEntry();
|
test_GetThreadSelectorEntry();
|
||||||
|
test_GetThreadContext();
|
||||||
#endif
|
#endif
|
||||||
test_QueueUserWorkItem();
|
test_QueueUserWorkItem();
|
||||||
test_RegisterWaitForSingleObject();
|
test_RegisterWaitForSingleObject();
|
||||||
|
|
|
@ -1848,7 +1848,7 @@ DECL_HANDLER(get_thread_context)
|
||||||
{
|
{
|
||||||
assert( reply->self );
|
assert( reply->self );
|
||||||
memset( context, 0, sizeof(context_t) );
|
memset( context, 0, sizeof(context_t) );
|
||||||
context->cpu = thread_context->regs.cpu;
|
context->cpu = thread->process->cpu;
|
||||||
if (req->flags & system_flags)
|
if (req->flags & system_flags)
|
||||||
{
|
{
|
||||||
get_thread_context( thread, context, req->flags & system_flags );
|
get_thread_context( thread, context, req->flags & system_flags );
|
||||||
|
|
Loading…
Reference in New Issue