git: 9front

Download patch

ref: 3d11a1f55819c7dab52e558ddd32265ad964b849
parent: 325a58049255c88657041f4d5963bb25fb1f5603
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Jul 18 19:27:15 EDT 2025

kernel: restore original context for noted(NDFLT)

When debugging, we want to see the original context,
not the one of the note handler calling noted(NDFLT0).

--- a/sys/src/9/port/sysproc.c
+++ b/sys/src/9/port/sysproc.c
@@ -928,6 +928,7 @@
 		up->lastnote->flag = NDebug;
 		/* fall through */
 	case NDFLT:
+		noted(up->dbgreg, nureg, arg);	/* for debugging */
 		if(up->lastnote->flag == NDebug)
 			pprint("suicide: %s\n", up->lastnote->msg);
 		pexit(up->lastnote->msg, up->lastnote->flag!=NDebug);
--