git: 5e4d56259e9f - stable/14 - PT_CONTINUE: if pc is set, mark the thread state as modified by user

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Thu, 05 Jun 2025 00:35:20 UTC
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=5e4d56259e9f1d18a3c65fadd2ff7c6ca03d962a

commit 5e4d56259e9f1d18a3c65fadd2ff7c6ca03d962a
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-05-27 21:08:43 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-06-05 00:35:03 +0000

    PT_CONTINUE: if pc is set, mark the thread state as modified by user
    
    (cherry picked from commit def0c056d3380b91ca7422d0a8727c6a4c8f6dae)
---
 sys/kern/sys_process.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index d4c0737a4769..5f647961d676 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -1239,6 +1239,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
 				    (u_long)(uintfptr_t)addr);
 				if (error)
 					goto out;
+				td2->td_dbgflags |= TDB_USERWR;
 			}
 			switch (req) {
 			case PT_TO_SCE: