Module Name:    src
Committed By:   kamil
Date:           Mon Jan 16 21:19:14 UTC 2017

Modified Files:
        src/sys/arch/i386/include: userret.h

Log Message:
Allow to mix single-step with hardware assisted watchpoints on i386

This case needs new handling in trap recognition.

Sponsored by <The NetBSD Foundation>


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/include/userret.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/include/userret.h
diff -u src/sys/arch/i386/include/userret.h:1.12 src/sys/arch/i386/include/userret.h:1.13
--- src/sys/arch/i386/include/userret.h:1.12	Thu Dec 15 12:04:18 2016
+++ src/sys/arch/i386/include/userret.h	Mon Jan 16 21:19:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: userret.h,v 1.12 2016/12/15 12:04:18 kamil Exp $	*/
+/*	$NetBSD: userret.h,v 1.13 2017/01/16 21:19:14 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -79,12 +79,9 @@ userret(struct lwp *l)
 	mi_userret(l);
 
 	/*
-	 * Never mix debug registers with single step, while technically
-	 * possible on x86 CPUs, it adds unnecessary complications we do
-	 * not want to handle it.
+	 * Allow to mix debug registers with single step.
 	 */
-	if ((l->l_md.md_regs->tf_eflags & PSL_T) == 0 &&
-	    l->l_md.md_flags & MDL_X86_HW_WATCHPOINTS)
+	if (l->l_md.md_flags & MDL_X86_HW_WATCHPOINTS)
 		set_x86_hw_watchpoints(l);
 	else
 		clear_x86_hw_watchpoints();

Reply via email to