- /* Set the debug registers for the new thread if they are used. */
- if (debug_registers_used)
- {
- struct i386_debug_reg_state *dr = &debug_reg_state;
- th->context.ContextFlags = CONTEXT_DEBUG_REGISTERS;
- GetThreadContext (th->h, &th->context);
-
- th->context.Dr0 = dr->dr_mirror[0];
- th->context.Dr1 = dr->dr_mirror[1];
- th->context.Dr2 = dr->dr_mirror[2];
- th->context.Dr3 = dr->dr_mirror[3];
- /* th->context.Dr6 = dr_status_mirror;
- FIXME: should we set dr6 also ?? */
- th->context.Dr7 = dr_control_mirror;
-
- SetThreadContext (th->h, &th->context);
- th->context.ContextFlags = 0;
- }