Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/include Allow to mix single-step with hardware...



details:   https://anonhg.NetBSD.org/src/rev/b0b01835fcb4
branches:  trunk
changeset: 350709:b0b01835fcb4
user:      kamil <kamil%NetBSD.org@localhost>
date:      Mon Jan 16 21:19:14 2017 +0000

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

This case needs new handling in trap recognition.

Sponsored by <The NetBSD Foundation>

diffstat:

 sys/arch/i386/include/userret.h |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (24 lines):

diff -r ff0789b581aa -r b0b01835fcb4 sys/arch/i386/include/userret.h
--- a/sys/arch/i386/include/userret.h   Mon Jan 16 19:15:28 2017 +0000
+++ b/sys/arch/i386/include/userret.h   Mon Jan 16 21:19:14 2017 +0000
@@ -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 @@
        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();



Home | Main Index | Thread Index | Old Index