Attached diff fixes a signal 0 panic when tracing a process inside a vkernel which does a syscall. How-to-reproduce inside a vkernel:

$ gdb ls
(gdb) break main
(gdb) r
(gdb) si
<repeatedly hammer your enter key, watch the panic>

I'm currently passing SIGTRAP because I think that makes sense, but I'm not 100% sure if I need to do more. The problem was found by Simon 'corecode' Schubert.

Cheers,
--
        Thomas E. Spanjaard
        [EMAIL PROTECTED]
diff --git a/sys/platform/vkernel/i386/trap.c b/sys/platform/vkernel/i386/trap.c
index 4e0f221..3515545 100644
--- a/sys/platform/vkernel/i386/trap.c
+++ b/sys/platform/vkernel/i386/trap.c
@@ -796,6 +796,13 @@ kernel_trap:
 		MAKEMPSAFE(have_mplock);
 		trap_fatal(frame, FALSE, eva);
 		goto out2;
+	case T_SYSCALL80:
+		/*
+		 * Pass SIGTRAP when tracing a process inside a VKERNEL.
+		 */
+		if (i == 0)
+			i = SIGTRAP;
+		/* break; */
 	}
 
 	/*

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to