Page MenuHomeFreeBSD

D55827.diff
No OneTemporary

D55827.diff

diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -242,6 +242,17 @@
return (false);
}
+static void
+trap_clear_step(struct thread *td, struct trapframe *frame)
+{
+ PROC_LOCK(td->td_proc);
+ if ((td->td_dbgflags & TDB_STEP) != 0) {
+ td->td_frame->tf_rflags &= ~PSL_T;
+ td->td_dbgflags &= ~TDB_STEP;
+ }
+ PROC_UNLOCK(td->td_proc);
+}
+
/*
* Table of handlers for various segment load faults.
*/
@@ -388,14 +399,8 @@
signo = SIGTRAP;
ucode = TRAP_TRACE;
dr6 = rdr6();
- if ((dr6 & DBREG_DR6_BS) != 0) {
- PROC_LOCK(td->td_proc);
- if ((td->td_dbgflags & TDB_STEP) != 0) {
- td->td_frame->tf_rflags &= ~PSL_T;
- td->td_dbgflags &= ~TDB_STEP;
- }
- PROC_UNLOCK(td->td_proc);
- }
+ if ((dr6 & DBREG_DR6_BS) != 0)
+ trap_clear_step(td, frame);
break;
case T_ARITHTRAP: /* arithmetic trap */

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 19, 4:14 PM (2 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29690726
Default Alt Text
D55827.diff (923 B)

Event Timeline