Source-Changes-HG archive

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

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



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

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

This case needs new handling in trap recognition.

Sponsored by <The NetBSD Foundation>

diffstat:

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

diffs (24 lines):

diff -r 81beb7f0bc37 -r 69658e0f5583 sys/arch/amd64/include/userret.h
--- a/sys/arch/amd64/include/userret.h  Mon Jan 16 21:19:14 2017 +0000
+++ b/sys/arch/amd64/include/userret.h  Mon Jan 16 21:19:35 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: userret.h,v 1.10 2016/12/15 12:04:17 kamil Exp $       */
+/*     $NetBSD: userret.h,v 1.11 2017/01/16 21:19:35 kamil Exp $       */
 
 /*
  * XXXfvdl same as i386 counterpart, but should probably be independent.
@@ -83,12 +83,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_rflags & 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