Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148549526
D55827.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
923 B
Referenced Files
None
Subscribers
None
D55827.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D55827: amd64: move code to clear PSL_T on debug exception into a helper
Attached
Detach File
Event Timeline
Log In to Comment